formatting and minor improvements.