Rework on the preferences window