Parse in module

Don't review yet.
this looks  really really bad. we should not be constructing junk just to pass it around. If you intend this to be used only by tests, put it in src/test. if you intend it to be used by production code, you need to come up with a more correct source for these dependencies.