Breaking out apply actions as a directive