Refactored spec