Simplifying copying code