formatting and comments
move imports to top
formatting
fix build in Python 2.6