Complete rehaul of package structure. Pep8 fixes.