Solution 41 + minor refactoring of other utilities