Follow-up to #16396: cleaned up code, fixed naming convention violations