Replace application refs with controller refs