Minor refactorings for clarity in setUpUI.js