refactor ui.js to match revealing module pattern
refactor ui.js to match revealing module pattern

kingjan1999/mail,ChristophWurst/mail,kingjan1999/mail,ChristophWurst/mail,kingjan1999/mail,ChristophWurst/mail