Added redirect functionality. Fixes #3.