Refactoring of namespaces
new js part and some refactoring on server side.