refactor keyboard handling, and fix routing

I did a bit of refactoring. Mostly stuff related to routing and keyboard handling.

One somewhat big change is that I changed the controller::show method to a controller::isVisible method to make the view more functional-style

Another significant one is that I changed the implementation of TodoList so that it retains its value across route changes. This will need to be refactored again later to support localStorage.