small code formatting changes and commenting