Algo optimisation, Unit tests added