Refactored spec file