Update from my old dev "branch"

I don’t know if all this works, but it’s just stuff I was playing
around with in a sandbox.