Fixed memory leak (added use of unique_ptr), simplified some code that sets up integration rules.
Added an ExportModule that can replace OutputManager.