Use 3.X compatible exception handling syntax
Remove unnecessary "pass"s
Move exceptions into separate module