Cleaning up 'next' redirect handling