Refectoring change global variables and removing (definitions)

Signed-off-by: Macartur de Sousa < macartur.sc@gmail.com >