Wired the nested code and preview controllers into the main controller