Adding code to support material clean up.