Reverted docstrings to original wording, as per assignment. Added internal comments for clarity.