Apply callbacks before controller and after