Refactor Model