Refactor views

* Extract tooltip helper
* Extract Problem.types
* Re-indent
* And some fixes.