Reduced memory leak, need to cut back on big global arrays