code cleaning and create copy repository feature