update layout and move route handling into namespaced controller files