Added database connection and html template support