cleanup and performance updates