Minor changes - memory management