Awesome work! However since you've tried to fit everything into 300 lines it is, in my opinion, unreadable. I would really love to learn more about the inner workings, but with so much obfuscation it is hard to understand what is going on.
Hi, making it short was not my goal. I wrote it "in my own style" and then just counted the lines.
What obfuscation do you see? There are not many comments, but I think it should be readable.