#4137 code cleanup