Delete unnecessary lines and format.