Specially relevant in the "I'm funny how?" one; Pesci and Liotta were instructed to improvise, other actors didn't know what was going to happen so their surprised-to-panicked reactions and puzzled faces are genuine. The scene mirrors what happened to Pesci in Real life; he told a mobster in a restaurant that he was funny and the mobster got angry. Scorsese implemented it once he learnt about it, as it wasn't in the book.
Scorsese also had all the actors involved in the kitchen scene (while Billy Batts was still in the trunk) simply improvise their dialogue for that sequence. The final scene with Spider was also ad-libbed, with the only scripted line being "Why don't you go fuck yourself?"