Little refactor of the utils