Refactor model conditions