AMD initUI + updates

amd loader for initUI (returns promise)
updates for various scripts