remove lock, as not needed in a library, update gitignore and composer.json
Remove code duplication and ensure defaultParameter is single line