Small cleanup of settings code