Python 3 compatibility, testing and documentation updates