Moved the hostname resolution for logging and server configuration to it's own method
Merged conflicts/changes