Implemented new database scheme