changed to template structure and added some basic database objects