craploads of changes. I think this makes the ruby wrapper much more flexible.