Namespaces and composer.json

I have added Namespaces and a proper composer.json which works with
packagist.org.

(this is also my first pull request so I might be doing it wrong)