Feature/cleanup

moved code out of __init__.py and other minor cleanup.