Added a util class for copying