[3.9] More code cleanup