Added templates directory and database configuration