Cleaned up code, added basic notation and summary, and deleted useless 2D click logic.