WL-2565 Code improvements from code review