Cleaned up the flowchart