Small cleanup of polygon code