Add support for yanking into a register

Yanking code should support placement into a register. I've rebased this on top of recent master and haven't tested the new integration much (working on that here).