[FCS-23] Fix problem with WebServer global variables; refactoring