Added legends to graph and formatted code in all project files