Various improvements to spec checker tool

This PR contains some bugfixes, clarifications and additional features for the annotation spec checker tool.