Index: trunk/ppImage/src/ppImageOptions.c
===================================================================
--- trunk/ppImage/src/ppImageOptions.c	(revision 6064)
+++ trunk/ppImage/src/ppImageOptions.c	(revision 6260)
@@ -1,7 +1,32 @@
-#include "ppImage.h"
+#include <stdio.h>
+#include "pslib.h"
+#include "ppConfig.h"
+#include "ppImageData.h"
+#include "ppImageOptions.h"
+
+static void imageOptionsFree(ppImageOptions *options)
+{
+    psFree(options->overscan);
+    psFree(options->nonLinearData);
+    psFree(options->nonLinearSource);
+}
+
+ppImageOptions *ppImageOptionsAlloc(void)
+{
+    ppImageOptions *options = psAlloc(sizeof(ppImageOptions));
+    psMemSetDeallocator(options, (psFreeFunc)imageOptionsFree);
+
+    // Initialise options
+    options->overscan = NULL;
+    options->nonLinearData = NULL;
+    options->nonLinearSource = NULL;
+
+    return options;
+}
+
 
 // XXX EAM : this needs signficant work to choose the detrend images based on the detrend database
 
-bool ppImageOptions(ppData *data, ppOptions *options, ppConfig *config)
+bool ppImageOptionsParse(ppImageData *data, ppImageOptions *options, ppConfig *config)
 {
 
