Convert x, y placement to i,j array indices, cleanup.