finishing generalizations and refactoring to make annotation dialog context configurable; seems to work in testing; mostly takes care of kltm/go-mme#66