phpDoc & small refactor