Continued revisions for clarity.
Additional markdown comments added to explain portions of the code