some cleanups

- added some documentation
- removed some debug statements