Cleaned up error extraction code so that private methods were not visible in derived classes