Removed the ErrorManager

Was just used by 1 function. Now this function does something similar.