Tags speedups

switch from deque to multimap and fix all the accessors