refactor out of init.py

fixes the structure part of #9