added clear fields feature and remove error class when cancel button is clicked