Change signatures of cleanup functions