cleanup, more docs/comments