Refactor of specs