Put joined table on left side of the ON clause

Just a cosmetic change.
Define final String.Format extensions