[IMP] some refactoring due to changes in the web client