refactor tests, fix PSR-2
refactor tests
try to refactor a bit