Further house cleaning on redirect function