WebUI: more refactoring.
WebUI: rename functions and enable strict mode.