Moved the textSize code to a function and added saving of settings after change is made