formatting and commenting fixes