Added errorSpan class definition