mistakeCount added and some cleanup