Factored out PhetModel.js