Error Manager Refactoring

The error check logic should be distributed to other classes.