cleanup and comments
more cleanup and small fixes