The methods 'storeAllFlags' and 'changeCurrentFlag' were modified to optimize the data stored in the array.