Adding in logic and event handlers into controllers