Packagist compatability and major changes to algorithm