diff --git a/src/CCO/Component.hs b/src/CCO/Component.hs
--- a/src/CCO/Component.hs
+++ b/src/CCO/Component.hs
@@ -100,9 +100,12 @@
 -- | Wraps a 'Component' into a program that provides it with input from the
 -- standard input channel and relays its output to the standard output channel.
 ioWrap :: Component String String -> IO ()
-ioWrap (C f) = do
-  input  <- getContents
+ioWrap c = getContents >>= ioRun c >>= putStrLn >> exitWith ExitSuccess
+
+-- | Run a 'Component' in the 'IO' monad. 
+ioRun :: Component a b -> a -> IO b 
+ioRun (C f) input = do
   result <- runFeedback (f input) 1 1 stderr
   case result of
     Nothing     -> exitFailure
-    Just output -> putStrLn output >> exitWith ExitSuccess
+    Just output -> return output
diff --git a/uu-cco.cabal b/uu-cco.cabal
--- a/uu-cco.cabal
+++ b/uu-cco.cabal
@@ -1,5 +1,5 @@
 name:                  uu-cco
-version:               0.1.0.3
+version:               0.1.0.4
 synopsis:              Utilities for compiler construction: core functionality
 description:           A small utility library accompanying the course on
                        Compiler Construction (INFOMCCO) at Utrecht Univerity.
