Added descriptions for each piece of the code