Moved all initialization to the mainController