Refactor redirection process in action classes.