Implement and refactor specs.