Some refactoring of specs and models