Refactor of utilities

Change-Id: Ifc421b89cc7acd1dd6a179421e0cad3d349c5a88
Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>