Some copying code adjustments (not finished)