More Optimization

More code optimization along with work on the Settings/Preferences
Window.