I looked at your branch, jaminh, and it looks good! Thank you for putting this much work into it. I do have some comments, however. Most of them are minor, and they can definitely be dealt with in terms of a PR.
So there are two ways we can go forward: you can make your branch a PR and I can comment on the things that I think needs work: essentially we would be working together on this. Or I can simply take over from here, by creating my own branch based on your work and make the changes myself (while still giving you credit, of course). So it really depends on how much time you would like to spend on this.