Simplified Exception types
Using absolute import and unicode literals. Debugging info uses __name__
Gateway class moved to the api module