diff --git a/mathexpr.cabal b/mathexpr.cabal
--- a/mathexpr.cabal
+++ b/mathexpr.cabal
@@ -1,5 +1,5 @@
 name:                mathexpr
-version:             0.3.0.0
+version:             0.3.1.0
 synopsis:            Parse and evaluate math expressions with variables and functions
 description:         A simple tool to evaluate math expressions as strings with support for custom functions and operators
 homepage:            https://github.com/mdibaiee/mathexpr
diff --git a/src/Numeric/MathExpr.hs b/src/Numeric/MathExpr.hs
--- a/src/Numeric/MathExpr.hs
+++ b/src/Numeric/MathExpr.hs
@@ -9,15 +9,26 @@
       import Data.Maybe (isJust, fromJust)
       import Data.List (find)
 
+      -- | Operators are in the form (character, precedence, function)
+      -- Example: ('+', 0, (+)), ('', 1, ())
+      -- (higher the precedence, the sooner the operator operates)
+      --
+      -- Functions are in the form (name, function)
+      -- Example: ("ln", log)
       data Settings = Settings { operators :: [(Char, Int, Double -> Double -> Double)]
                                , functions :: [(String, Double -> Double)]
                                }
-
+      -- | Operators are in the form (character, precedence, function)
+      -- Example: ('+', 0, (+)), ('', 1, ())
+      -- (higher the precedence, the sooner the operator operates)
       defaultOperators = [
           ('+', 0, (+)), ('-', 0, (-)),
           ('*', 1, (*)), ('/', 1, (/)),
           ('^', 2, (**))
         ]
+
+      -- | Functions are in the form (name, function)
+      -- Example: ("ln", log)
       defaultFunctions = [("ln", log), ("sin", sin), ("cos", cos)]
 
       instance Default Settings where
@@ -62,7 +73,7 @@
         where
           replace c
             | isVariable c = pad $ show $ fromJust $ c `lookup` vars
-            | otherwise = c
+            | otherwise = pad c
 
           isVariable c = isJust $ c `lookup` vars
 
