Really lovely code, thanks for sharing it. I was able to free up 190 bytes with some simple optimizations, and I think there is room to free up more if you need it.
I think this might be interesting to others, so I pick it up in this new thread.
I sent a PR with the changes. LMK if I messed up anything! 