Some more work, still very basic, some templates and db usage