cleaned model generator