#838308 by Dave Reid: Fixed ignored domain source.
by Dave Reid: Consolidated functions into the primary modules file. There was not enough code for that to be a good decision.