cleaned up memory usage.