Implemented copy() for variables.