App controller, hijax and macros cleanup