Cleanup and add Python 2.6 compatibility again