Copyedit, clean up code