Finished first version of the algorithm chapter.