v3.21 code readability improvements