Clean some redirection-connected code