Make cleanup funciton public