>Or better yet find out what it wants for input so it doesn't need to do transformations.
Code generating code from code will always be an uncertain proposition.

Well, it gets to be the tail chasing the dog, doesn’t it?