Removed leftover old '-locked' check
Some whitespace and comment changes also
Whitespace and comments