Changing pt.x and pt.y to be getters rather than values.