web-ui: changed js modules to AMD form for better dependency handling