Some refactoring to specs