Added comments for abstract algorithm.