Revert ref support for the time being

There might be a more elegant way of supporting refs...
Cleanup
Tweak examples to take advantage of arbitrary argument passing