Add tests for new redirects and fix a few bugs in the redirects