Refactore model