Moving the API calls into a separate service.
Make the API service depend on $http, instead of passing it in from the controller.
Removing unused "pageShow" method.
Removing unused 'linksShow' method.
Pushing MediaWiki "search" logic into the API service.
Temporarily splitting out "search" and "get links" codepaths in API.
Disentangling the URL constructor from $scope.
Disentangling the API search mechanism from $scope.