Minor improvements in the working version.