Fixing up database class executing non query commands