Added tests for database handler and begun creating database handler