Adding optional Freemarker templating, and support for Postgres and Mongo