made several fixes to formatting