added routes and layouts and some work on the db