Refactoring.
Added more specs.