Whitespace cleanup
Use 'as' keyword in exceptions for python3 compatibility
Convert print's to function calls to make it compatible to python3
Convert print's to function calls to make it compatible to python3