Killing more memory leaks detected by valgrind

Also got rid of a couple of conditionals that may have been referencing
uninitialized objects that it caught.