fix some issues with annotation display; refactor annotations and flag methods