Registration cleanup. Make vhash and phash optional when registering.