Minor memory handling cleanup