Started refactoring AnnotatePlugin.{cpp,h}