Added the composer.json file.
Added the usage of namespaces.
Correction of some bugs and replaced gloabl use for debug global
variable.
Removed the debug message print method, we will soon use a true logger
instead.