Code cleaning on utils functions (see issue #1)