cLock: refactorings and cleanup (no functional changes)

Change-Id: I4ca0f3eea0cb3260f248d3abc6099b45c3ed1c27