Passes unit tests for tagging.  Beginning refactoring of tagging and view code