A bit more refactoring (I will get the reek score down, yes I will...)