Refactoring for clarity and readability. Currently each point consists of two objects - an x coordinate and a y coordinate. Ideally points should be objects, with x and y properties.