Added cleanup functions