A final rework of the engine.

Signed-off-by: Wolftein <agustin.l.alvarez@hotmail.com>