Reverting previous commit.
Wrapping all imports in __all__ in all __init__.py
Reformatting the entire codebase to adhere to flake8.

Also refactored some things.
Manually merging with master and resolving conflicts.