Minor modifications to remove memory leaks
Cosmetics