Some refactoring with the utils library