Intense refactor.
Engine refactor.
Remove debug prints