Code cleanup
Cleaning locks?