Improve namespace structure.

Currently the namespaces are very tangled e.g. many of the application paths are defined in view namespaces. This PR tries to untangle them a little bit.
Behaviour should not be affected!

Review wanted!
Even though it's not really part of this commit... Calling `write-db` using `swap!` hides the side effect of writing to a file. Maybe hold on to the return value of `(swap! db assoc :time (now))` and persist that?