minor tweaks
started refactoring into .py