Part 1

A full description of the original code.