updated code.
Added:

Namespaces, PSR4 autoloading, tested