some refactoring for the web IDE