Updated for packaging and distribution on pypi