formatting and other fixes