Splits statement annotation extraction and key labeling into separate functions.