new WIP

@JorgeFerrer here's the latest that I'm sending to Kamesh to work from. Squished and fixed the Freemarker/include issues.
We should probably review the method names in this class, but it's probably not the most important thing yet.