Add callback to the close function of the SettingsButton class.
Change method of getting characters count.
?