Clean up memory usage