Some minor clean to improve memory usage