Simplify the add_model_methods method a bit.