Additional work and bug fixes—this is the final version from May 15