Move variable declaration to controller to minimize role of view