Debug v3 week 3

Updated code, comments, and flowchart!