Refactoring spec