Modified the way success/error classes are ebign set