Redirect on the shortened code
Separate the URL logic
Add documentation via comments