Fixed a number of dll separation issues.