minor refactoring and added coverage of locker class