Pretty cool! I think the input buffering is a little to generous though. Also, these comments are almost unreadable :/
This is only a little test. But I can quickly address the issue with the comments.