Covert to python 2 and python 3 compatible code with python-future
Refactor monolithic script into modules. Update setup to handle cases with missing setuptools