dont require phpunit in dev, also use psr-4
change property visibility
use iterator_apply for the iterations instead of a foreach loop