Refactored spec component