Before we try to rewrite tagging, we should create unit tests for all public tagging function in the Image entity. That's the basic API, and we'll be a lot more confident about rewriting the tagging system if we have a way of validating that our new code does the same thing as our old code.