Refactoring of wrappers and models