Added cleanup function