Added view and set up databaseconnection