Improvements in the algorithm, but Incendio not working yet