fixing names, adding the model simplification code