misc fixes, comments, cleanup