Minor improvements to getLayerPoints