Optimized build

Also fixed some issues related to RequireJS oddities and some style
issues in the UI.