Fix up some formatting and errors