As I wrote before, you really should consider refactoring your code for better integration.