refactored annotation parsing routines