Cleaned up, commented, and ready for grading