little bit more cleanup and comments