[WIP] Tag refactor

Less code, more performance. What could be better?