DataBase and Main classes cleaned up.