Extract Method clearArrays

clearArrays method is added which clears all the arrays uses in the
method.
Extracting the method SaveClass is done and the extra lines and spaces
are deleted.