clean up code, indent, remove extraneous spaces