Implement Cody's suggestions (#3472)