Added a main controller for whole app which handles state class of main block depending on which route is active.