Added controller functions to app