Changes for defects: 2419-2431

A good number of small changes to handle defects reported in review 1482