Refactor model to models