Add factions page and refactor backend.

- All the data classes have been combined into a single Python module to facilitate using them together.