Made a marginal refactoring in UI.js...just some tidying up