Generate classes based on the mozilla parser api

- now can filter based on types
I changed it to not go as deep. You're correct, I think isinstance(elem, list) => not isinstance(elem, basestring) so we can eliminate that.