Added more protections against removal of items from Locks
Removed unused debug messages