Changes to error display, removed debug code