Fix formatting and warnings