Code improvements to main.c

Removed those pesky goto's. This isn't Visual Basic.

Improved creation of return codes.

Made some Informational logging conditional (as it was expected to be).