Rework of app to be better deployable into django. Fixes #7