Reformat, cleanup. UNTESTED.