Cosmetic changes
Plug several memory leaks in new core-spec code