minor improvements and corrections