clean up new redirect code