Separate view sets for API
Cleanup

- Adds docstrings to functions and classes
- Describes models in detail
- Properly indents templates
- Lots of other housekeeping and cruft removal.
- Flake8 formatting.