Trying to fix database class