Major refactor

- reorganized templates
- reorganized views -- changed to class-based views
- got rid of factors
- changed tabs and page relationships