Python 3.4 compatibility & fixed some of the tests.