Clean up shortened_url code