clean up model.js