added CSS class added to error elements, added error removal function