COOPR-501: Updated code according to the comments above.