move the error handling to error_estimator where it belongs
remove more useless code