Code refactor and added tree graph drawing from path calculation.