some refactoring

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