Added flowchart and refactored incline code