code cleaning as of 53X backport