ECDR-56: Updated metadata setting logic.

Also fixed some grammer and spelling errors.