Pep8 fixes

Fixed few indentation, visual indentation, new line endings and other pep8 warnings.