Implements View class to help comply with PSR-1.
Fixes wrong variable reference.
Moves jquery ui dialog output into a view.
Merge branch 'mvc' into develop