Implemented new Database class