Code clean up and modified flow visualization to only show non-zero regions.