Fixes to tags, added tag-enable/disable functionality, optimizations