Added initial version of the algorithms.