diff --git a/netlib-carray.cabal b/netlib-carray.cabal
--- a/netlib-carray.cabal
+++ b/netlib-carray.cabal
@@ -1,5 +1,5 @@
 Name:             netlib-carray
-Version:          0.0
+Version:          0.0.1
 License:          BSD3
 License-File:     LICENSE
 Author:           Henning Thielemann <haskell@henning-thielemann.de>
@@ -20,7 +20,7 @@
 Build-Type:       Simple
 
 Source-Repository this
-  Tag:         0.0
+  Tag:         0.0.1
   Type:        darcs
   Location:    http://hub.darcs.net/thielema/netlib-carray/
 
@@ -30,8 +30,8 @@
 
 Library
   Build-Depends:
+    netlib-ffi >=0.0.1 && <0.1,
     carray >=0.1.5 && <0.2,
-    storable-complex >=0.2.2 && <0.3,
     transformers >=0.4 && <0.6,
     base >=4.5 && <5
 
diff --git a/src/Numeric/Netlib/CArray/Utility.hs b/src/Numeric/Netlib/CArray/Utility.hs
--- a/src/Numeric/Netlib/CArray/Utility.hs
+++ b/src/Numeric/Netlib/CArray/Utility.hs
@@ -1,48 +1,62 @@
-module Numeric.Netlib.CArray.Utility where
+module Numeric.Netlib.CArray.Utility (
+   FortranIO,
+   Util.run,
+   Util.runChecked,
+   Util.check,
+   Util.assert,
+   Util.ignore,
+   Util.cint,
+   Util.alloca,
+   Util.allocaArray,
+   Util.bool,
+   Util.char,
+   Util.string,
+   Util.float,
+   Util.double,
+   Util.complexFloat,
+   Util.complexDouble,
+   Util.real,
+   Util.complex,
+   Util.number,
 
+   newArray,
+   newArray1,
+   newArray2,
+   newArray3,
+   sizes1,
+   sizes2,
+   sizes3,
+   range,
+   array,
+   arrayBounds,
+   ioarray,
+   unzipBounds,
+   (^!),
+   ) where
+
+import qualified Numeric.Netlib.Utility as Util
+import Numeric.Netlib.Utility (FortranIO)
+
 import qualified Data.Array.CArray as CArray
 import Data.Array.IOCArray (IOCArray, withIOCArray)
 import Data.Array.CArray (CArray, withCArray, Ix)
 
-import qualified Foreign.Marshal.Utils as Marshal
-import qualified Foreign.Marshal.Array as Array
-import qualified Foreign.Marshal.Alloc as Alloc
-import qualified Foreign.C.String as CStr
 import qualified Foreign.C.Types as C
-import Foreign.Storable.Complex ()
-import Foreign.Storable (Storable, peek)
+import Foreign.Storable (Storable)
 import Foreign.Ptr (Ptr)
 
 import Control.Monad.Trans.Cont (ContT(ContT))
-import Control.Monad.IO.Class (liftIO)
-import Control.Monad (when)
 import Control.Applicative ((<$>))
 
-import Data.Complex (Complex)
 
-
-type FortranIO r = ContT r IO
-
-run :: FortranIO r (IO a) -> FortranIO r a
-run act = act >>= liftIO
-
-runChecked :: String -> FortranIO r (Ptr C.CInt -> IO a) -> FortranIO r a
-runChecked name act = do
-   info <- alloca
-   a <- run $ fmap ($info) act
-   liftIO $ check name (peek info)
-   return a
-
-check :: String -> IO C.CInt -> IO ()
-check msg f = do
-   err <- f
-   when (err/=0) $ error $ msg ++ ": " ++ show err
-
-assert :: String -> Bool -> IO ()
-assert msg success = when (not success) $ error $ "assertion failed: " ++ msg
-
-ignore :: String -> Int -> IO ()
-ignore _msg _dim = return ()
+_match :: (Show a, Eq a) => String -> String -> a -> [a] -> a
+_match func name a as =
+   case filter (a/=) as of
+      [] -> a
+      adiff:_ ->
+         error $
+            func ++ ": mismatching " ++ name ++ ": " ++
+            show a ++ " /= " ++ show adiff
 
 
 newArray :: (Ix i, Storable e) => (i, i) -> IO (CArray i e)
@@ -72,38 +86,9 @@
     CArray.rangeSize (k0,k1))
 
 
-cint :: Int -> FortranIO r (Ptr C.CInt)
-cint = ContT . Marshal.with . fromIntegral
-
 range :: (Int,Int) -> FortranIO r (Ptr C.CInt)
-range = cint . CArray.rangeSize
-
-alloca :: (Storable a) => FortranIO r (Ptr a)
-alloca = ContT Alloc.alloca
-
-allocaArray :: (Storable a) => Int -> FortranIO r (Ptr a)
-allocaArray = ContT . Array.allocaArray
-
-bool :: Bool -> FortranIO r (Ptr Bool)
-bool = ContT . Marshal.with
-
-char :: Char -> FortranIO r (Ptr C.CChar)
-char = ContT . Marshal.with . CStr.castCharToCChar
-
-string :: String -> FortranIO r (Ptr C.CChar)
-string = ContT . CStr.withCString
-
-float :: Float -> FortranIO r (Ptr Float)
-float = ContT . Marshal.with
-
-double :: Double -> FortranIO r (Ptr Double)
-double = ContT . Marshal.with
-
-complexFloat :: Complex Float -> FortranIO r (Ptr (Complex Float))
-complexFloat = ContT . Marshal.with
+range = Util.cint . CArray.rangeSize
 
-complexDouble :: Complex Double -> FortranIO r (Ptr (Complex Double))
-complexDouble = ContT . Marshal.with
 
 
 array :: (Storable a) => CArray i a -> FortranIO r (Ptr a)
