Fix errors in code block.
Fix algorithm.
Answer exercises.