Further completed the db schema. Added templates dir.