Many many updates

This fixes issue #2, among other things.