Cleaning up memory.