Refactoring. Gather all redirects to one function.