added comments to Coordinate
added comments and cleaned up code