Refactor plot models.