Agent finished, corrected a problem in memory management in proxy. Simplified some memory management functions in proxy.