Some refactoring. All names are imports from mtg.__init__, so you don't need long names any more. Python 3.2 compatible with-statements (no ExitStack class using)