Rebased Pol's IntegralImage PR
Fixed integral image PR + small features