rewrote an initial version of the terminal bases viewer.
added some new helper routes.

Nothing big really.