Revert "Various small fixes"

This reverts commit 46d27eafadc910be424874ce02766e5a9c140f92.
memory leak fix for yaml2plist