refactored into files, LockMode in Locking namespace