Lookup class and Lock documentation

- split lookup into separate file, starting to turn it into a class.
- added more docstrings to lock and lookup.
Lookup now classy.