Refactors spec