furious refactoring, still not happy with parameterization of request paths etc