Adjusted coordinate system throughout program for consistency.