Escapes tags; Stores tag ids better