Add cleanup function