Updating to latest version of Bill's code