Refactoring

Signed-off-by: Carlo Caione <carlo@caione.org>
Better vars management

Signed-off-by: Carlo Caione <carlo@caione.org>