Replaced $this->Database with Database::getInstance()
Removed Database class import
Fixed query to lock a collection
Use importStatic() instead of static() for callback import
Removed unnecessary imports