diff --git a/.travis.yml b/.travis.yml
--- a/.travis.yml
+++ b/.travis.yml
@@ -34,7 +34,7 @@
 - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
 - stack config set system-ghc --global true
 - stack --version
-- cabal install leancheck express speculate || cabal install leancheck express speculate --lib
+- cabal install leancheck express speculate || cabal v1-install leancheck express speculate
 
 script:
 - make && make test
diff --git a/extrapolate.cabal b/extrapolate.cabal
--- a/extrapolate.cabal
+++ b/extrapolate.cabal
@@ -1,5 +1,5 @@
 name:                extrapolate
-version:             0.4.2
+version:             0.4.4
 synopsis:            generalize counter-examples of test properties
 description:
   Extrapolate is a tool able to provide generalized counter-examples of test
@@ -84,7 +84,7 @@
 source-repository this
   type:            git
   location:        https://github.com/rudymatela/extrapolate
-  tag:             v0.4.2
+  tag:             v0.4.4
 
 library
   exposed-modules: Test.Extrapolate
@@ -101,10 +101,10 @@
                  , Test.Extrapolate.Utils
   other-extensions:    TemplateHaskell, CPP
   build-depends: base >= 4 && < 5
-               , leancheck >= 0.9.3
+               , leancheck >= 0.9.4
                , template-haskell
-               , speculate >= 0.4.2
-               , express >= 0.1.3
+               , speculate >= 0.4.6
+               , express >= 0.1.6
   hs-source-dirs:      src
   default-language:    Haskell2010
 
diff --git a/mk/ghcdeps b/mk/ghcdeps
--- a/mk/ghcdeps
+++ b/mk/ghcdeps
@@ -2,7 +2,7 @@
 #
 # ghcdeps: generate Haskell make dependencies for compiling with GHC.
 #
-# Copyright (c) 2015-2020 Rudy Matela.
+# Copyright (c) 2015-2021 Rudy Matela.
 # Distributed under the 3-Clause BSD licence.
 #
 # From a list of files provided on standard input,
@@ -46,4 +46,5 @@
 	rm -f tmp.mk
 done |
 sort |
+grep -v "^Loaded package environment from " |
 sed -e 's,  *, \\\n  ,g'
diff --git a/mk/haddock-i b/mk/haddock-i
--- a/mk/haddock-i
+++ b/mk/haddock-i
@@ -2,7 +2,7 @@
 #
 # haddock-i: list haddock's -i parameters.
 #
-# Copyright (c) 2015-2020 Rudy Matela.
+# Copyright (c) 2015-2021 Rudy Matela.
 # Distributed under the 3-Clause BSD licence.
 #
 # $ haddock-i <package1> <package2> ... <packageN>
diff --git a/mk/haskell.mk b/mk/haskell.mk
--- a/mk/haskell.mk
+++ b/mk/haskell.mk
@@ -1,6 +1,6 @@
 # Implicit rules for compiling Haskell code.
 #
-# Copyright (c) 2015-2020 Rudy Matela.
+# Copyright (c) 2015-2021 Rudy Matela.
 # Distributed under the 3-Clause BSD licence.
 #
 # You can optionally configure the "Configuration variables" below in your main
@@ -80,7 +80,8 @@
 
 
 # Cleaning rule (add as a clean dependency)
-.PHONY: clean-hi-o
+clean-hs: clean-hi-o clean-haddock clean-cabal clean-stack
+
 clean-hi-o:
 	find $(ALL_HSS) | sed -e 's/hs$$/o/'      | xargs rm -f
 	find $(ALL_HSS) | sed -e 's/hs$$/hi/'     | xargs rm -f
@@ -113,6 +114,11 @@
 	  $(HADDOCK_HLNK_SRC) \
 	  $(HADDOCKFLAGS)
 
+clean-cabal:
+	rm -rf dist/ dist-newstyle/ cabal.project.local cabal.project.local~
+
+clean-stack:
+	rm -rf .stack-work/ stack.yaml.lock
 
 # lists all Haskell source files
 list-all-hss:
diff --git a/mk/install-on b/mk/install-on
--- a/mk/install-on
+++ b/mk/install-on
@@ -2,9 +2,12 @@
 #
 # mk/install-on: install or updates the mk folder on a Haskell project
 #
+# Copyright (c) 2019-2021 Rudy Matela.
+# Distributed under the 3-Clause BSD licence.
+#
 # usage: ./mk/install-on path/to/project
 #
-# This assumes a few things:
+# This script assumes that:
 #
 # * tests are stored in a "test/" folder
 # * sources are stored in a "src/" folder
diff --git a/src/Test/Extrapolate/ConditionalGeneralization.hs b/src/Test/Extrapolate/ConditionalGeneralization.hs
--- a/src/Test/Extrapolate/ConditionalGeneralization.hs
+++ b/src/Test/Extrapolate/ConditionalGeneralization.hs
@@ -28,7 +28,7 @@
 conditionalCounterExampleGeneralizations
   :: Int -> [[Expr]] -> (Expr -> [Expr]) -> (Expr -> Expr -> Expr)
   -> Expr -> [Expr]
-conditionalCounterExampleGeneralizations maxCondSize atoms grounds (-==-) e  =
+conditionalCounterExampleGeneralizations maxConditionSize atoms grounds (-==-) e  =
   [ canonicalize $ g -&&- wc
   | g <- fastCandidateGeneralizations isListable e
   , let wc = weakestCondition' g
@@ -38,7 +38,7 @@
   where
   isListable = not . null . grounds . holeAsTypeOf
   weakestCondition' = weakestCondition
-    (theoryAndReprConds maxCondSize (===) atoms)
+    (theoryAndReprConds (===) maxConditionSize atoms)
     grounds
   e1 === e2 = isTrue grounds $ e1 -==- e2
 
diff --git a/src/Test/Extrapolate/Expr.hs b/src/Test/Extrapolate/Expr.hs
--- a/src/Test/Extrapolate/Expr.hs
+++ b/src/Test/Extrapolate/Expr.hs
@@ -48,7 +48,7 @@
 
 unand :: Expr -> (Expr,Expr)
 unand ((op :$ e1) :$ e2) | op == andE  =  (e1,e2)
-unand _  =  error "unimply: not an implication"
+unand _  =  error "unand: not an implication"
 
 -- | /O(n)/.
 -- Replaces the function in the given 'Expr'.
diff --git a/src/Test/Extrapolate/Speculation.hs b/src/Test/Extrapolate/Speculation.hs
--- a/src/Test/Extrapolate/Speculation.hs
+++ b/src/Test/Extrapolate/Speculation.hs
@@ -30,27 +30,12 @@
 import Test.Extrapolate.Utils
 import Test.Extrapolate.Expr
 
--- Generates expression schemas and a theory
-theoryAndReprsFromPropAndAtoms :: Int -> (Expr -> Expr -> Bool) -> [[Expr]] -> (Thy,[[Expr]])
-theoryAndReprsFromPropAndAtoms maxConditionSize (===) ess =
-  theoryAndRepresentativesFromAtoms
-    maxConditionSize compareExpr (const True) (===) ess
-  where
-  compareExpr :: Expr -> Expr -> Ordering
-  compareExpr = compareComplexity <> lexicompareBy cmp
-  e1 `cmp` e2 | arity e1 == 0 && arity e2 /= 0 = LT
-  e1 `cmp` e2 | arity e1 /= 0 && arity e2 == 0 = GT
-  e1 `cmp` e2 = compareIndex (concat ess) e1 e2 <> e1 `compare` e2
--- NOTE: "concat ess" may be an infinite list.  This function assumes
--- that the symbols will appear on the list eventually for termination.  If I
--- am correct this ivariant is assured by the rest of the code.
-
-theoryAndReprExprs :: Int -> (Expr -> Expr -> Bool) -> [[Expr]] -> (Thy,[Expr])
-theoryAndReprExprs maxConditionSize (===) =
+theoryAndReprExprs :: (Expr -> Expr -> Bool) -> Int -> [[Expr]] -> (Thy,[Expr])
+theoryAndReprExprs (===) maxConditionSize  =
     (\(thy,ess) -> (thy, concat $ take maxConditionSize ess))
-  . theoryAndReprsFromPropAndAtoms maxConditionSize (===)
+  . theoryAndRepresentativesFromAtoms (===) maxConditionSize
 
-theoryAndReprConds :: Int -> (Expr -> Expr -> Bool) -> [[Expr]] -> (Thy, [Expr])
-theoryAndReprConds maxConditionSize (===) ess  =  (thy, filter (\c -> typ c == boolTy) es)
+theoryAndReprConds :: (Expr -> Expr -> Bool) -> Int -> [[Expr]] -> (Thy, [Expr])
+theoryAndReprConds (===) maxConditionSize ess  =  (thy, filter (\c -> typ c == boolTy) es)
   where
-  (thy,es) = theoryAndReprExprs maxConditionSize (===) ess
+  (thy,es) = theoryAndReprExprs (===) maxConditionSize ess
diff --git a/stack.yaml b/stack.yaml
--- a/stack.yaml
+++ b/stack.yaml
@@ -4,6 +4,6 @@
 - .
 
 extra-deps:
-- leancheck-0.9.3
-- speculate-0.4.2
-- express-0.1.3
+- leancheck-0.9.4
+- speculate-0.4.6
+- express-0.1.6
diff --git a/test/sdist b/test/sdist
--- a/test/sdist
+++ b/test/sdist
@@ -2,7 +2,7 @@
 #
 # test/sdist: tests the package generated by "cabal sdist".
 #
-# Copyright (c) 2015-2020 Rudy Matela.
+# Copyright (c) 2015-2021 Rudy Matela.
 # Distributed under the 3-Clause BSD licence.
 
 set -xe
diff --git a/test/step-by-step.hs b/test/step-by-step.hs
--- a/test/step-by-step.hs
+++ b/test/step-by-step.hs
@@ -115,7 +115,7 @@
   ]
 
 thyes :: (Thy,[Expr])
-thyes  =  theoryAndReprConds (testableMaxConditionSize prop) (===) (testableAtoms prop)
+thyes  =  theoryAndReprConds (===) (testableMaxConditionSize prop) (testableAtoms prop)
   where
   e1 === e2 = isTrue grounds $ e1 -==- e2
   grounds = testableGrounds prop
