Adding tests for lock, and changing basic lock behavior.