Code review cleanup and fixes

LMS-11056