formatting changes and small fixes