Some reorganizations and cleaning in Model class