Removed an unecessary function.
Removed a lock that was no longer needed.