Added using of UserDefault for global settings.