added composer.json, refactored class to use namespaces, added curl options