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!