reorganized to make an installable python package.