Convert to unix line ending.
Move algorithms 2 and 3 to the correct section.