update composer.json
add tests config
Refactor all code