Need to add pp:Coords = New Coords before you start populating the object with data.
Also, instead of using X%, Y% etc, get into the habit of declaring it as X:Int, Y:Int. Does the same job but you should find your code is more readable.
Also, instead of using X%, Y% etc, get into the habit of declaring it as X:Int, Y:Int. Does the same job but you should find your code is more readable.