Switched controller logic
Only send the last link on each request, for now.
Refactored logic into service.