Added additional memory clean up