Made lots of changes to template, including switching to postgres