Code updated in order to compile in g++

Warnings still existent, but YOLO.

Signed-off-by: Alan Rodriguez <alanrodriguezromero@gmail.com>