Scrutinizer fixes

Scrutinizer suggested to remove this unused parameter, update some doc and remove some code duplication... So I did.