Various fixes and refactoring; Main changes in denotation tagging;