Implemented Algorithm::_apply
Fix: obvious bugs
A bit more efficient (and theoretically good) computation