refactor tags to be simple objects not refs