Refactor model for PaaS