Commented all code

Added comments to all code to outline the way each line of code
performs.