Sorted out add/remove of tags, also made sure to escape all displayed and user-input values on screen