code refactoring spec files