diff --git a/README.md b/README.md
index 9c2b139..cb5e137 100644
--- a/README.md
+++ b/README.md
@@ -78,14 +78,14 @@ table.Render()
 ```
 
     DATE   |       DESCRIPTION        |  CV2  | AMOUNT
-+----------+--------------------------+-------+---------+
+-----------+--------------------------+-------+----------
   1/1/2014 | Domain name              |  2233 | $10.98
   1/1/2014 | January Hosting          |  2233 | $54.95
   1/4/2014 | February Hosting         |  2233 | $51.00
   1/4/2014 | February Extra Bandwidth |  2233 | $30.00
-+----------+--------------------------+-------+---------+
+-----------+--------------------------+-------+----------
                                         TOTAL | $146 93
-                                      +-------+---------+
+                                      --------+----------
 
 ```
 
@@ -267,6 +267,34 @@ Note: Caption text will wrap with total width of rendered table.
 Movie ratings.
 ```
 
+#### Render table into a string
+
+Instead of rendering the table to `io.Stdout` you can also render it into a string. Go 1.10 introduced the `strings.Builder` type which implements the `io.Writer` interface and can therefore be used for this task. Example:
+
+```go
+package main
+
+import (
+    "strings"
+    "fmt"
+
+    "github.com/olekukonko/tablewriter"
+)
+
+func main() {
+    tableString := &strings.Builder{}
+    table := tablewriter.NewWriter(tableString)
+
+    /*
+     * Code to fill the table
+     */
+
+    table.Render()
+
+    fmt.Println(tableString.String())
+}
+```
+
 #### TODO
 - ~~Import Directly from CSV~~  - `done`
 - ~~Support for `SetFooter`~~  - `done`
diff --git a/debian/changelog b/debian/changelog
index d6662f4..c8c344d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+golang-github-olekukonko-tablewriter (0.0.1+git20190618.cc27d85-1) UNRELEASED; urgency=medium
+
+  * New upstream snapshot.
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sun, 23 Jun 2019 04:41:16 +0000
+
 golang-github-olekukonko-tablewriter (0.0.1-1) unstable; urgency=medium
 
   [ Alexandre Viau ]
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..84b405d
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,8 @@
+module github.com/olekukonko/tablewriter
+
+go 1.12
+
+require (
+	github.com/mattn/go-runewidth v0.0.4
+	github.com/olekukonko/tablewriter v0.0.1
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..9d5e335
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,4 @@
+github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y=
+github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
+github.com/olekukonko/tablewriter v0.0.1 h1:b3iUnf1v+ppJiOfNX4yxxqfWKMQPZR5yoh8urCTFX88=
+github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
diff --git a/table.go b/table.go
index dec0385..06341bc 100644
--- a/table.go
+++ b/table.go
@@ -319,16 +319,29 @@ func (t *Table) ClearFooter() {
 	t.footers = [][]string{}
 }
 
+// Center based on position and border.
+func (t *Table) center(i int) string {
+	if i == -1 && !t.borders.Left {
+		return t.pRow
+	}
+
+	if i == len(t.cs)-1 && !t.borders.Right {
+		return t.pRow
+	}
+
+	return t.pCenter
+}
+
 // Print line based on row width
 func (t *Table) printLine(nl bool) {
-	fmt.Fprint(t.out, t.pCenter)
+	fmt.Fprint(t.out, t.center(-1))
 	for i := 0; i < len(t.cs); i++ {
 		v := t.cs[i]
 		fmt.Fprintf(t.out, "%s%s%s%s",
 			t.pRow,
 			strings.Repeat(string(t.pRow), v),
 			t.pRow,
-			t.pCenter)
+			t.center(i))
 	}
 	if nl {
 		fmt.Fprint(t.out, t.newLine)
@@ -517,6 +530,9 @@ func (t *Table) printFooter() {
 
 		// Print first junction
 		if i == 0 {
+			if length > 0 && !t.borders.Left {
+				center = t.pRow
+			}
 			fmt.Fprint(t.out, center)
 		}
 
@@ -524,16 +540,27 @@ func (t *Table) printFooter() {
 		if length == 0 {
 			pad = SPACE
 		}
-		// Ignore left space of it has printed before
+		// Ignore left space as it has printed before
 		if hasPrinted || t.borders.Left {
 			pad = t.pRow
 			center = t.pCenter
 		}
 
+		// Change Center end position
+		if center != SPACE {
+			if i == end && !t.borders.Right {
+				center = t.pRow
+			}
+		}
+
 		// Change Center start position
 		if center == SPACE {
 			if i < end && len(t.footers[i+1][0]) != 0 {
-				center = t.pCenter
+				if !t.borders.Left {
+					center = t.pRow
+				} else {
+					center = t.pCenter
+				}
 			}
 		}
 
@@ -706,6 +733,11 @@ func (t *Table) printRowMergeCells(writer io.Writer, columns [][]string, rowIdx
 	// Pad Each Height
 	pads := []int{}
 
+	// Checking for ANSI escape sequences for columns
+	is_esc_seq := false
+	if len(t.columnsParams) > 0 {
+		is_esc_seq = true
+	}
 	for i, line := range columns {
 		length := len(line)
 		pad := max - length
@@ -727,9 +759,14 @@ func (t *Table) printRowMergeCells(writer io.Writer, columns [][]string, rowIdx
 
 			str := columns[y][x]
 
+			// Embedding escape sequence with column value
+			if is_esc_seq {
+				str = format(str, t.columnsParams[y])
+			}
+
 			if t.autoMergeCells {
 				//Store the full line to merge mutli-lines cells
-				fullLine := strings.Join(columns[y], " ")
+				fullLine := strings.TrimRight(strings.Join(columns[y], " "), " ")
 				if len(previousLine) > y && fullLine == previousLine[y] && fullLine != "" {
 					// If this cell is identical to the one above but not empty, we don't display the border and keep the cell empty.
 					displayCellBorder = append(displayCellBorder, false)
@@ -767,7 +804,7 @@ func (t *Table) printRowMergeCells(writer io.Writer, columns [][]string, rowIdx
 	//The new previous line is the current one
 	previousLine = make([]string, total)
 	for y := 0; y < total; y++ {
-		previousLine[y] = strings.Join(columns[y], " ") //Store the full line for multi-lines cells
+		previousLine[y] = strings.TrimRight(strings.Join(columns[y], " ")," ") //Store the full line for multi-lines cells
 	}
 	//Returns the newly added line and wether or not a border should be displayed above.
 	return previousLine, displayCellBorder
diff --git a/table_test.go b/table_test.go
index 6268870..aaf7943 100644
--- a/table_test.go
+++ b/table_test.go
@@ -131,7 +131,7 @@ func TestCSVInfo(t *testing.T) {
 
 	got := buf.String()
 	want := `   FIELD   |     TYPE     | NULL | KEY | DEFAULT |     EXTRA       
-+----------+--------------+------+-----+---------+----------------+
+-----------+--------------+------+-----+---------+-----------------
   user_id  | smallint(5)  | NO   | PRI | NULL    | auto_increment  
   username | varchar(10)  | NO   |     | NULL    |                 
   password | varchar(100) | NO   |     | NULL    |                 
@@ -187,7 +187,7 @@ func TestNoBorder(t *testing.T) {
 	table.Render()
 
 	want := `    DATE   |       DESCRIPTION        |  CV2  | AMOUNT   
-+----------+--------------------------+-------+---------+
+-----------+--------------------------+-------+----------
   1/1/2014 | Domain name              |  2233 | $10.98   
   1/1/2014 | January Hosting          |  2233 | $54.95   
            |     (empty)              |       |          
@@ -195,9 +195,9 @@ func TestNoBorder(t *testing.T) {
   1/4/2014 | February Hosting         |  2233 | $51.00   
   1/4/2014 | February Extra Bandwidth |  2233 | $30.00   
   1/4/2014 |     (Discount)           |  2233 | -$1.00   
-+----------+--------------------------+-------+---------+
+-----------+--------------------------+-------+----------
                                         TOTAL | $145.93  
-                                      +-------+---------+
+                                      --------+----------
 `
 
 	checkEqual(t, buf.String(), want, "border table rendering failed")
@@ -395,14 +395,14 @@ func TestPrintCaptionWithFooter(t *testing.T) {
 	table.Render()
 
 	want := `    DATE   |       DESCRIPTION        |  CV2  | AMOUNT   
-+----------+--------------------------+-------+---------+
+-----------+--------------------------+-------+----------
   1/1/2014 | Domain name              |  2233 | $10.98   
   1/1/2014 | January Hosting          |  2233 | $54.95   
   1/4/2014 | February Hosting         |  2233 | $51.00   
   1/4/2014 | February Extra Bandwidth |  2233 | $30.00   
-+----------+--------------------------+-------+---------+
+-----------+--------------------------+-------+----------
                                         TOTAL | $146.93  
-                                      +-------+---------+
+                                      --------+----------
 This is a very long caption. The text should wrap to the
 width of the table.
 `
@@ -841,8 +841,8 @@ func TestAutoMergeRows(t *testing.T) {
 | NAME |              SIGN              | RATING |
 +------+--------------------------------+--------+
 | A    | The Good                       |    500 |
-+------+--------------------------------+--------+
-| A    | The Very very very very very   |    288 |
++      +--------------------------------+--------+
+|      | The Very very very very very   |    288 |
 |      | Bad Man                        |        |
 +------+                                +--------+
 | B    |                                |    120 |
@@ -850,6 +850,32 @@ func TestAutoMergeRows(t *testing.T) {
 +------+--------------------------------+--------+
 | C    | The Very very Bad Man          |    200 |
 +------+--------------------------------+--------+
+`
+	checkEqual(t, buf.String(), want)
+
+	buf.Reset()
+	table = NewWriter(&buf)
+	table.SetHeader([]string{"Name", "Sign", "Rating"})
+
+	dataWithlongText2 := [][]string{
+		{"A", "The Good", "500"},
+		{"A", "The Very very very very very Bad Man", "288"},
+		{"B", "The Very very Bad Man", "120"},
+	}
+	table.AppendBulk(dataWithlongText2)
+	table.SetAutoMergeCells(true)
+	table.SetRowLine(true)
+	table.Render()
+	want = `+------+--------------------------------+--------+
+| NAME |              SIGN              | RATING |
++------+--------------------------------+--------+
+| A    | The Good                       |    500 |
++      +--------------------------------+--------+
+|      | The Very very very very very   |    288 |
+|      | Bad Man                        |        |
++------+--------------------------------+--------+
+| B    | The Very very Bad Man          |    120 |
++------+--------------------------------+--------+
 `
 	checkEqual(t, buf.String(), want)
 }
diff --git a/util.go b/util.go
index 9e8f0cb..380e7ab 100644
--- a/util.go
+++ b/util.go
@@ -61,7 +61,7 @@ func Title(name string) string {
 }
 
 // Pad String
-// Attempts to play string in the center
+// Attempts to place string in the center
 func Pad(s, pad string, width int) string {
 	gap := width - DisplayWidth(s)
 	if gap > 0 {
@@ -73,7 +73,7 @@ func Pad(s, pad string, width int) string {
 }
 
 // Pad String Right position
-// This would pace string at the left side fo the screen
+// This would place string at the left side of the screen
 func PadRight(s, pad string, width int) string {
 	gap := width - DisplayWidth(s)
 	if gap > 0 {
@@ -83,7 +83,7 @@ func PadRight(s, pad string, width int) string {
 }
 
 // Pad String Left position
-// This would pace string at the right side fo the screen
+// This would place string at the right side of the screen
 func PadLeft(s, pad string, width int) string {
 	gap := width - DisplayWidth(s)
 	if gap > 0 {