reduce memory footprint and clean