Added template handling functions
Added template to init; moved DB util file
Added basic template for pages