Various code cleanups

I ran Zone and World through Valgrind a few times and found/fixed a few memory leaks and uninitialized variables. In addition, when a program exits, it will now properly return 1 if there was an error and 0 on success to allow for easier startup scripting.