re-factor AppHostConfig initialization