COOPR-510: Refactored, according to review comments.