Please share. I'm curious, myself. And maybe someone else runs across the same issue, and could use your wisdom on this.
Unless your code is proprietary, it would be better to post your solution here (as WolfShade suggested) for the future benefit of anyone who encounters the same issue. If you aren't willing to do that, then maybe you can delete the question entirely so it doesn't become a "dead end" of frustration for those who come along later.
-Carl V. - Moderator