Added server/client exception handler and comments