Remove some unused code
Simplify definition of error_