more docs and some cleanup