Client side refactoring

Changed the namespaces structures
Added constructors to the namespaces
Added scripts calls in the html on right order and on the right place