Index: trunk/ppStack/src/ppStack.h
===================================================================
--- trunk/ppStack/src/ppStack.h	(revision 28253)
+++ trunk/ppStack/src/ppStack.h	(revision 30620)
@@ -1,2 +1,12 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <pslib.h>
+#include <psmodules.h>
+#include <ppStats.h>
+#include <psphot.h>
+
 #ifndef PPSTACK_H
 #define PPSTACK_H
@@ -7,7 +17,4 @@
 #include <pslib.h>
 #include <psmodules.h>
-
-#include "ppStackOptions.h"
-#include "ppStackErrorCodes.h"
 
 // Mask values for inputs
@@ -25,4 +32,5 @@
 // List of files
 typedef enum {
+    PPSTACK_FILES_NONE,                 // NOP list
     PPSTACK_FILES_PREPARE,              // Files for preparation
     PPSTACK_FILES_TARGET,               // Files for target generation
@@ -33,4 +41,8 @@
 } ppStackFileList;
 
+#include "ppStackOptions.h"
+#include "ppStackThread.h"
+#include "ppStackLoop.h"
+#include "ppStackErrorCodes.h"
 
 // Setup command-line arguments
@@ -180,6 +192,15 @@
     );
 
+bool ppStackWriteVariance(const char *name, // Name of image
+			  psMetadata *header, // Header
+			  const psImage *variance, // Variance
+			  const psImage *covariance, // Variance
+			  pmConfig *config // Configuration
+    );
+
 /// Return an appropriate exit code based on the error code
 psExit ppStackExitCode(psExit exitValue);
 
+bool ppStackCleanup(pmConfig *config, ppStackOptions *options) PS_ATTR_NORETURN;
+
 #endif
