Updated for new 1.1 release
including patches from Tim Bunce.