Major core refactoring: seperation out of Annotation2.