Fix routes and redirect

This fixes #3. In addition, I ran RuboCop to clean up the code a bit.