Finally Re-factored AppController

It's working. Working on Viewmodels next to simplify the logic in the
controller.