Can this be moved into a common location so that the same function is not duplicated in LMS and CMS code?