version 1.0: python 2.7 support, pep 8 style changes, refactoring, setup as a package