Remove consistency checking and fixing

Experimentation shows that assumptions about consistency are incorrect, due to
the way the device handles losing its GPS signal.
Fix tabs
Split into separate JS files for readability
Fix indentation
Many large changes which should really be split up

- Fix consistency checks
- Factor out methods
- Improve display