Refactored the processing of rest requests a bit, making room for
the task to find nearby tags.