Better using of namespaces
Added footer to template. Pulled some complex outside Controller to its own class