Allow external global domain.

and some style and formatting changes.