Minor refactoring of spec.