Remove unnecessary lines from code