Code review!

Some thoughts & suggestions.  Some of these are half-formed (i.e. I broke your code :), but point in the direction of changes I would make.  I'd be happy to talk about these or take another look after you finish your numpy refactoring.