Made some changes so the engine now runs in java too