Various tweaks for gcc.
Improved server bootstrap logic for better error handling/cleanup.