More tinkering
Woo, it (mostly) works now!