More changes to template, started writing controllers