Refactor & spec