Refactoring of the Error system.