Annotation editing works again

As a bonus, annotations now support rich text.
Added a reference counting pointer for messages