Clean up anaconda_mode.py and add missing tests
Drop support for python 3.2