Refactoring models into data, client and server packages