Add copying and hashing functions.