More memory improvements