DEV-67 Code review fixes (also fixes DEV-65)