Refactored code for /webapps/:id/tags