Update controller: typo, fix bugs, optimize

Minor changes optimizing operation and fix major bugs.

@todo It`s wrong "fat" controller, need total rewrite: move additional methods into Kodoc class, add "lazy" load for config and routes.