Updated code to work on both Python 2 and 3

Also added all supported versions of Python. Just because, you know.