Remove WebUI and ModuleOperation classes to web.main.api bundle.
Refactor code and remove some warnings.