WIP Refactoring

Signed-off-by: Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>