Yep, the code could be refactored with a private function that clears out the \<li\>.  `cancel` and this call could reference that new function.