Improvements to spec_common.