clean-up and minor corrections