Applying little fixes and PEP8 to make travis green

Note that in the diff (not in this view), there's the symbol indicating that there is no '\n' at the end of the file.