packaging for composer

Some changes that allowed to use this class as a composer package ;)