diff --git a/Bindings/LevMar.hsc b/Bindings/LevMar.hsc
--- a/Bindings/LevMar.hsc
+++ b/Bindings/LevMar.hsc
@@ -6,7 +6,7 @@
 --------------------------------------------------------------------------------
 -- |
 -- Module      :  Bindings.LevMar
--- Copyright   :  (c) 2009 Roel van Dijk & Bas van Dijk
+-- Copyright   :  (c) 2009-2010 Roel van Dijk & Bas van Dijk
 -- License     :  BSD-style (see the file LICENSE)
 --
 -- Maintainer  :  vandijk.roel@gmail.com, v.dijk.bas@gmail.com
@@ -127,15 +127,15 @@
 -- Imports
 --------------------------------------------------------------------------------
 
-import Prelude           ( Num, Fractional )
+import Prelude           ( Num, Fractional, Double, Float )
 
 #if __GLASGOW_HASKELL__ < 700
 import Prelude           ( negate, fromInteger, fromRational )
 #endif
 
+import Data.Int          ( Int )
 import System.IO         ( IO )
-import Data.Char         ( String )
-import Foreign.C.Types   ( CInt, CFloat, CDouble )
+import Prelude           ( String )
 import Foreign.Ptr       ( Ptr, FunPtr, freeHaskellFunPtr )
 import Control.Exception ( bracket )
 
@@ -202,10 +202,10 @@
 type Work              = Ptr
 type Covar             = Ptr
 type AData             = Ptr ()
-type NrOfParameters    = CInt
-type NrOfMeasurements  = CInt
-type NrOfConstraints   = CInt
-type MaxIterations     = CInt
+type NrOfParameters    = Int
+type NrOfMeasurements  = Int
+type NrOfConstraints   = Int
+type MaxIterations     = Int
 
 
 --------------------------------------------------------------------------------
@@ -238,157 +238,157 @@
 -- Types of the Levenberg-Marquardt algorithms.
 --------------------------------------------------------------------------------
 
-type LevMarDer cr =  FunPtr (Model cr)
-                  -> FunPtr (Jacobian cr)
-                  -> Parameters cr
-                  -> Measurements cr
-                  -> NrOfParameters
-                  -> NrOfMeasurements
-                  -> MaxIterations
-                  -> Options cr
-                  -> Info cr
-                  -> Work cr
-                  -> Covar cr
-                  -> AData
-                  -> IO CInt
+type LevMarDer r =  FunPtr (Model r)
+                 -> FunPtr (Jacobian r)
+                 -> Parameters r
+                 -> Measurements r
+                 -> NrOfParameters
+                 -> NrOfMeasurements
+                 -> MaxIterations
+                 -> Options r
+                 -> Info r
+                 -> Work r
+                 -> Covar r
+                 -> AData
+                 -> IO Int
 
-type LevMarDif cr =  FunPtr (Model cr)
-                  -> Parameters cr
-                  -> Measurements cr
-                  -> NrOfParameters
-                  -> NrOfMeasurements
-                  -> MaxIterations
-                  -> Options cr
-                  -> Info cr
-                  -> Work cr
-                  -> Covar cr
-                  -> AData
-                  -> IO CInt
+type LevMarDif r =  FunPtr (Model r)
+                 -> Parameters r
+                 -> Measurements r
+                 -> NrOfParameters
+                 -> NrOfMeasurements
+                 -> MaxIterations
+                 -> Options r
+                 -> Info r
+                 -> Work r
+                 -> Covar r
+                 -> AData
+                 -> IO Int
 
-type LevMarBCDer cr =  FunPtr (Model cr)
-                    -> FunPtr (Jacobian cr)
-                    -> Parameters cr
-                    -> Measurements cr
+type LevMarBCDer r =  FunPtr (Model r)
+                   -> FunPtr (Jacobian r)
+                   -> Parameters r
+                   -> Measurements r
+                   -> NrOfParameters
+                   -> NrOfMeasurements
+                   -> LowerBounds r
+                   -> UpperBounds r
+                   -> MaxIterations
+                   -> Options r
+                   -> Info r
+                   -> Work r
+                   -> Covar r
+                   -> AData
+                   -> IO Int
+
+type LevMarBCDif r =  FunPtr (Model r)
+                   -> Parameters r
+                   -> Measurements r
+                   -> NrOfParameters
+                   -> NrOfMeasurements
+                   -> LowerBounds r
+                   -> UpperBounds r
+                   -> MaxIterations
+                   -> Options r
+                   -> Info r
+                   -> Work r
+                   -> Covar r
+                   -> AData
+                   -> IO Int
+
+type LevMarLecDer r =  FunPtr (Model r)
+                    -> FunPtr (Jacobian r)
+                    -> Parameters r
+                    -> Measurements r
                     -> NrOfParameters
                     -> NrOfMeasurements
-                    -> LowerBounds cr
-                    -> UpperBounds cr
+                    -> ConstraintsMatrix r
+                    -> ConstraintsVector r
+                    -> NrOfConstraints
                     -> MaxIterations
-                    -> Options cr
-                    -> Info cr
-                    -> Work cr
-                    -> Covar cr
+                    -> Options r
+                    -> Info r
+                    -> Work r
+                    -> Covar r
                     -> AData
-                    -> IO CInt
+                    -> IO Int
 
-type LevMarBCDif cr =  FunPtr (Model cr)
-                    -> Parameters cr
-                    -> Measurements cr
+type LevMarLecDif r =  FunPtr (Model r)
+                    -> Parameters r
+                    -> Measurements r
                     -> NrOfParameters
                     -> NrOfMeasurements
-                    -> LowerBounds cr
-                    -> UpperBounds cr
+                    -> ConstraintsMatrix r
+                    -> ConstraintsVector r
+                    -> NrOfConstraints
                     -> MaxIterations
-                    -> Options cr
-                    -> Info cr
-                    -> Work cr
-                    -> Covar cr
+                    -> Options r
+                    -> Info r
+                    -> Work r
+                    -> Covar r
                     -> AData
-                    -> IO CInt
+                    -> IO Int
 
-type LevMarLecDer cr =  FunPtr (Model cr)
-                     -> FunPtr (Jacobian cr)
-                     -> Parameters cr
-                     -> Measurements cr
+type LevMarBLecDer r =  FunPtr (Model r)
+                     -> FunPtr (Jacobian r)
+                     -> Parameters r
+                     -> Measurements r
                      -> NrOfParameters
                      -> NrOfMeasurements
-                     -> ConstraintsMatrix cr
-                     -> ConstraintsVector cr
+                     -> LowerBounds r
+                     -> UpperBounds r
+                     -> ConstraintsMatrix r
+                     -> ConstraintsVector r
                      -> NrOfConstraints
+                     -> Weights r
                      -> MaxIterations
-                     -> Options cr
-                     -> Info cr
-                     -> Work cr
-                     -> Covar cr
+                     -> Options r
+                     -> Info r
+                     -> Work r
+                     -> Covar r
                      -> AData
-                     -> IO CInt
+                     -> IO Int
 
-type LevMarLecDif cr =  FunPtr (Model cr)
-                     -> Parameters cr
-                     -> Measurements cr
+type LevMarBLecDif r =  FunPtr (Model r)
+                     -> Parameters r
+                     -> Measurements r
                      -> NrOfParameters
                      -> NrOfMeasurements
-                     -> ConstraintsMatrix cr
-                     -> ConstraintsVector cr
+                     -> LowerBounds r
+                     -> UpperBounds r
+                     -> ConstraintsMatrix r
+                     -> ConstraintsVector r
                      -> NrOfConstraints
+                     -> Weights r
                      -> MaxIterations
-                     -> Options cr
-                     -> Info cr
-                     -> Work cr
-                     -> Covar cr
+                     -> Options r
+                     -> Info r
+                     -> Work r
+                     -> Covar r
                      -> AData
-                     -> IO CInt
-
-type LevMarBLecDer cr =  FunPtr (Model cr)
-                      -> FunPtr (Jacobian cr)
-                      -> Parameters cr
-                      -> Measurements cr
-                      -> NrOfParameters
-                      -> NrOfMeasurements
-                      -> LowerBounds cr
-                      -> UpperBounds cr
-                      -> ConstraintsMatrix cr
-                      -> ConstraintsVector cr
-                      -> NrOfConstraints
-                      -> Weights cr
-                      -> MaxIterations
-                      -> Options cr
-                      -> Info cr
-                      -> Work cr
-                      -> Covar cr
-                      -> AData
-                      -> IO CInt
-
-type LevMarBLecDif cr =  FunPtr (Model cr)
-                      -> Parameters cr
-                      -> Measurements cr
-                      -> NrOfParameters
-                      -> NrOfMeasurements
-                      -> LowerBounds cr
-                      -> UpperBounds cr
-                      -> ConstraintsMatrix cr
-                      -> ConstraintsVector cr
-                      -> NrOfConstraints
-                      -> Weights cr
-                      -> MaxIterations
-                      -> Options cr
-                      -> Info cr
-                      -> Work cr
-                      -> Covar cr
-                      -> AData
-                      -> IO CInt
+                     -> IO Int
 
 
 --------------------------------------------------------------------------------
 -- Levenberg-Marquardt algorithms.
 --------------------------------------------------------------------------------
 
-#ccall slevmar_der      , LevMarDer     CFloat
-#ccall dlevmar_der      , LevMarDer     CDouble
-#ccall slevmar_dif      , LevMarDif     CFloat
-#ccall dlevmar_dif      , LevMarDif     CDouble
-#ccall slevmar_bc_der   , LevMarBCDer   CFloat
-#ccall dlevmar_bc_der   , LevMarBCDer   CDouble
-#ccall slevmar_bc_dif   , LevMarBCDif   CFloat
-#ccall dlevmar_bc_dif   , LevMarBCDif   CDouble
-#ccall slevmar_lec_der  , LevMarLecDer  CFloat
-#ccall dlevmar_lec_der  , LevMarLecDer  CDouble
-#ccall slevmar_lec_dif  , LevMarLecDif  CFloat
-#ccall dlevmar_lec_dif  , LevMarLecDif  CDouble
-#ccall slevmar_blec_der , LevMarBLecDer CFloat
-#ccall dlevmar_blec_der , LevMarBLecDer CDouble
-#ccall slevmar_blec_dif , LevMarBLecDif CFloat
-#ccall dlevmar_blec_dif , LevMarBLecDif CDouble
+#ccall slevmar_der      , LevMarDer     Float
+#ccall dlevmar_der      , LevMarDer     Double
+#ccall slevmar_dif      , LevMarDif     Float
+#ccall dlevmar_dif      , LevMarDif     Double
+#ccall slevmar_bc_der   , LevMarBCDer   Float
+#ccall dlevmar_bc_der   , LevMarBCDer   Double
+#ccall slevmar_bc_dif   , LevMarBCDif   Float
+#ccall dlevmar_bc_dif   , LevMarBCDif   Double
+#ccall slevmar_lec_der  , LevMarLecDer  Float
+#ccall dlevmar_lec_der  , LevMarLecDer  Double
+#ccall slevmar_lec_dif  , LevMarLecDif  Float
+#ccall dlevmar_lec_dif  , LevMarLecDif  Double
+#ccall slevmar_blec_der , LevMarBLecDer Float
+#ccall dlevmar_blec_der , LevMarBLecDer Double
+#ccall slevmar_blec_dif , LevMarBLecDif Float
+#ccall dlevmar_blec_dif , LevMarBLecDif Double
 
 
 --------------------------------------------------------------------------------
@@ -397,56 +397,56 @@
 
 type Errors = Ptr
 
-type LevMarChkJac cr =  FunPtr (Model cr)
-                     -> FunPtr (Jacobian cr)
-                     -> Parameters cr
-                     -> NrOfParameters
-                     -> NrOfMeasurements
-                     -> AData
-                     -> Errors cr
-                     -> IO ()
+type LevMarChkJac r =  FunPtr (Model r)
+                    -> FunPtr (Jacobian r)
+                    -> Parameters r
+                    -> NrOfParameters
+                    -> NrOfMeasurements
+                    -> AData
+                    -> Errors r
+                    -> IO ()
 
-#ccall dlevmar_chkjac , LevMarChkJac CDouble
-#ccall slevmar_chkjac , LevMarChkJac CFloat
+#ccall dlevmar_chkjac , LevMarChkJac Double
+#ccall slevmar_chkjac , LevMarChkJac Float
 
 
 --------------------------------------------------------------------------------
 -- Utils
 --------------------------------------------------------------------------------
 
-type BestFitParameterIx = CInt
+type BestFitParameterIx = Int
 
 -- | Standard deviation.
-type LevMarStddev cr =  Covar cr
-                     -> NrOfParameters
-                     -> BestFitParameterIx
-                     -> IO cr
+type LevMarStddev r =  Covar r
+                    -> NrOfParameters
+                    -> BestFitParameterIx
+                    -> IO r
 
 -- | Pearson's correlation coefficient for best-fit parameters.
-type LevMarCorCoef cr =  Covar cr
-                      -> NrOfParameters
-                      -> BestFitParameterIx
-                      -> BestFitParameterIx
-                      -> IO cr
+type LevMarCorCoef r =  Covar r
+                     -> NrOfParameters
+                     -> BestFitParameterIx
+                     -> BestFitParameterIx
+                     -> IO r
 
 -- | Coefficient of determination (R2).
-type LevMarR2 cr =  FunPtr (Model cr)
-                 -> Parameters cr
-                 -> Measurements cr
-                 -> NrOfParameters
-                 -> NrOfMeasurements
-                 -> AData
-                 -> Result cr
-                 -> IO CInt
+type LevMarR2 r =  FunPtr (Model r)
+                -> Parameters r
+                -> Measurements r
+                -> NrOfParameters
+                -> NrOfMeasurements
+                -> AData
+                -> Result r
+                -> IO Int
 
 type Result = Ptr
 
-#ccall dlevmar_stddev  , LevMarStddev  CDouble
-#ccall slevmar_stddev  , LevMarStddev  CFloat
-#ccall dlevmar_corcoef , LevMarCorCoef CDouble
-#ccall slevmar_corcoef , LevMarCorCoef CFloat
-#ccall dlevmar_R2      , LevMarR2      CDouble
-#ccall slevmar_R2      , LevMarR2      CFloat
+#ccall dlevmar_stddev  , LevMarStddev  Double
+#ccall slevmar_stddev  , LevMarStddev  Float
+#ccall dlevmar_corcoef , LevMarCorCoef Double
+#ccall slevmar_corcoef , LevMarCorCoef Float
+#ccall dlevmar_R2      , LevMarR2      Double
+#ccall slevmar_R2      , LevMarR2      Float
 
 
 -- The End ---------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -5,7 +5,7 @@
 the GPL as detailed in levmar-2.4/LICENSE. The copyright of these
 files belong to Manolis Lourakis.
 
-Copyright (c) 2009 Roel van Dijk, Bas van Dijk
+Copyright (c) 2009-2010 Roel van Dijk, Bas van Dijk
 
 All rights reserved.
 
diff --git a/README.markdown b/README.markdown
new file mode 100644
--- /dev/null
+++ b/README.markdown
@@ -0,0 +1,31 @@
+Low level Haskell bindings to the [C levmar (Levenberg-Marquardt)
+library](http://www.ics.forth.gr/~lourakis/levmar/)
+
+See the [levmar](http://hackage.haskell.org/package/levmar) package
+for a high-level wrapper around this package.
+
+The Levenberg-Marquardt algorithm is an iterative technique that finds
+a local minimum of a function that is expressed as the sum of squares
+of nonlinear functions. It has become a standard technique for
+nonlinear least-squares problems and can be thought of as a
+combination of steepest descent and the Gauss-Newton method. When the
+current solution is far from the correct one, the algorithm behaves
+like a steepest descent method: slow, but guaranteed to converge. When
+the current solution is close to the correct solution, it becomes a
+Gauss-Newton method.
+
+Both unconstrained and constrained (under linear equations and box
+constraints) Levenberg-Marquardt variants are included.  All functions
+have `Double` and `Float` variants.
+
+Note that the included C library is lightly patched to make it
+pure. This way the functions can be used inside `unsafePerformIO`.
+
+License
+=======
+
+All files **except** those in the `levmar-2.4` directory fall under
+the BSD3 license. The levmar C library, which is bundled with this
+binding, falls under the GPL. If you build a program which is linked
+with this binding then it is also linked with levmar. This means such
+a program can only by distributed under the terms of the GPL.
diff --git a/bindings-levmar.cabal b/bindings-levmar.cabal
--- a/bindings-levmar.cabal
+++ b/bindings-levmar.cabal
@@ -1,16 +1,21 @@
 name:          bindings-levmar
-version:       0.2.0.1
+version:       1.0
 cabal-version: >= 1.6
 build-type:    Simple
 stability:     experimental
 author:        Roel van Dijk & Bas van Dijk
 maintainer:    vandijk.roel@gmail.com, v.dijk.bas@gmail.com
-copyright:     (c) 2009 Roel van Dijk & Bas van Dijk
+copyright:     (c) 2009-2010 Roel van Dijk & Bas van Dijk
 license:       OtherLicense
 license-file:  LICENSE
+homepage:      https://github.com/basvandijk/bindings-levmar/
+bug-reports:   https://github.com/basvandijk/bindings-levmar/issues
 category:      Numerical, FFI
 synopsis:      Low level bindings to the C levmar (Levenberg-Marquardt) library
-description:   The Levenberg-Marquardt algorithm is an iterative
+description:   See the @levmar@ package for a high-level wrapper
+               around this package.
+               .
+               The Levenberg-Marquardt algorithm is an iterative
                technique that finds a local minimum of a function that
                is expressed as the sum of squares of nonlinear
                functions. It has become a standard technique for
@@ -43,7 +48,7 @@
                program can only by distributed under the terms of the
                GPL.
 
-extra-source-files: LICENSE
+extra-source-files: README.markdown
                   , levmar-2.4/LICENSE
                   , levmar-2.4/*.h
                   , levmar-2.4/*.c
@@ -67,8 +72,8 @@
   default:     False
 
 source-repository head
-  type: darcs
-  location: http://code.haskell.org/bindings-levmar
+  type: git
+  location: git://github.com/basvandijk/bindings-levmar.git
 
 library
   build-depends: base         >= 3     && < 4.4
@@ -92,7 +97,7 @@
     else
       extra-libraries: mkl_intel
   else
-    extra-libraries: lapack
+    extra-libraries: lapack blas
 
   if flag(accelerate)
     frameworks: Accelerate
