Slight changes to appDomainStuff. I'm going to be trying to put this stuff back into LL.
Same as previous commit.