Memory leak additions and updates to the TDD and flowchart.