Very cool! It's a shame that it's too long, though, so I forked your gist and cut down some characters. If you don't want to use my version outright, I can tell you that it helps to use flip() and goto instead of _update() and _draw(), that you never use the variables g and q, and that you can remove several linebreaks after lines that end in parentheses. There might be more too, but it fits nicely now.