global lock, added docs, white space.