Added a description of the how the code works.