code review, part 1

Nice work! Things look pretty good.

In general, I think changing up some of your variable naming would be a big clarity boost (again, I think http://pyvideo.org/video/1676/the-naming-of-ducks-where-dynamic-types-meet-sma is relevant even though it's Python). I've noted a few spots where I think this is particularly relevant.

There are a few more specific comments inline.

(you probably don't want to merge this: it just gives us a place to discuss my comments. or, I can just come find you once I read over the rest of the code)