Refactor word model