in_memory cleanup

cleaning up the in memory workspace