Updated database class, and fixed classes accordingly
Fixed classes to new database class