Formatting and minor fixes