General refactoring of specs