Simplified and modified the class, added composer.json to allow use by composer