Eliminated all static storage and memory leaks