Updated deploy.r, and added getmodels.r function