Moves some functions to controller engine