Cleaned up a bit of the logic for selecting themes in the event handler for the settings UI