Extracted and generalized annotation fragmenting.

Will be reused in converter...