This enables some move semantics for potentially big arguments. I also removed a redundant vector from the internal state of cgd.