Bed time. I'm working on a scratch script to get everything right (not in repo yet; it's a mess)