fixed up issue to do with socket.io and removed $webPath global