Some fixes for Python 2
Style and doc fixes