Minor cleanup.

- Removed unused class `History` and associated tests.
- Added docblock comments to `AppRepository`.
- Various minor formatting fixes.