Define mappings in class scope.
Use AssertionErrors to terminate special tests.
Use pass to do nothing.
Remove unused imports.
Merge pull request #1 from jone/master

Some improvements