Formatting and other fixes