diff --git a/core/DataTable.php b/core/DataTable.php
index 82933d58ca589ef1253dd22130e05572f36b114d..df325fb5e9a1e3aefd6d04007dff641bec909913 100644
--- a/core/DataTable.php
+++ b/core/DataTable.php
@@ -1490,4 +1490,17 @@ class Piwik_DataTable
 		}
 		return $result;
 	}
+	
+	/**
+	 * Returns a new DataTable created with data from a 'simple' array.
+	 * 
+	 * @param array $array
+	 * @return Piwik_DataTable
+	 */
+	public static function makeFromSimpleArray( $array )
+	{
+		$dataTable = new Piwik_DataTable();
+		$dataTable->addRowsFromSimpleArray($array);
+		return $dataTable;
+	}
 }
diff --git a/core/DataTable/Renderer.php b/core/DataTable/Renderer.php
index 8f48e88903906b2c4485a3b2be19995d46db4341..3196b67740bd3ff54ef49af72c5aac7f1a9fd980 100644
--- a/core/DataTable/Renderer.php
+++ b/core/DataTable/Renderer.php
@@ -365,7 +365,7 @@ abstract class Piwik_DataTable_Renderer
 	 * In the old code, arrays were added to new DataTable instances, and then rendered.
 	 * This transformation wrapped associative arrays except under certain circumstances,
 	 * including:
-	 *  - single element (ie, array('nb_visits' => 0))
+	 *  - single element (ie, array('nb_visits' => 0))   (not wrapped for some renderers)
 	 *  - empty array (ie, array())
 	 *  - array w/ arrays/DataTable instances as values (ie,
 	 *			array('name' => 'myreport',
@@ -374,11 +374,14 @@ abstract class Piwik_DataTable_Renderer
 	 *				  'reportData' => array(...)) )
 	 * 
 	 * @param array $array
+	 * @param bool $wrapSingleValues Whether to wrap array('key' => 'value') arrays. Some
+	 *                               renderers wrap them and some don't.
 	 * @param bool|null $isAssociativeArray Whether the array is associative or not.
 	 *                                      If null, it is determined.
 	 * @return bool
 	 */
-	protected static function shouldWrapArrayBeforeRendering( $array, $isAssociativeArray = null )
+	protected static function shouldWrapArrayBeforeRendering(
+		$array, $wrapSingleValues = true, $isAssociativeArray = null )
 	{
 		if (empty($array))
 		{
@@ -395,7 +398,8 @@ abstract class Piwik_DataTable_Renderer
 		{
 			// we don't wrap if the array has one element that is a value
 			$firstValue = reset($array);
-			if (count($array) === 1
+			if (!$wrapSingleValues
+				&& count($array) === 1
 				&& (!is_array($firstValue)
 					&& !is_object($firstValue)))
 			{
diff --git a/core/DataTable/Renderer/Console.php b/core/DataTable/Renderer/Console.php
index 78266bb67ca2c51ce75474c56a38f3ccfef4855f..aeae7d058b3b7e363ab588426b1ae4b462074a60 100644
--- a/core/DataTable/Renderer/Console.php
+++ b/core/DataTable/Renderer/Console.php
@@ -98,6 +98,11 @@ class Piwik_DataTable_Renderer_Console extends Piwik_DataTable_Renderer
 	 */
 	protected function renderTable($table, $prefix = "")
 	{
+		if (is_array($table)) // convert array to DataTable
+		{
+			$table = Piwik_DataTable::makeFromSimpleArray($table);
+		}
+		
 		if($table instanceof Piwik_DataTable_Array)
 		{
 			return $this->renderDataTableArray($table, $prefix);
diff --git a/core/DataTable/Renderer/Csv.php b/core/DataTable/Renderer/Csv.php
index 48f2c810059c9e8588b364dd79eb396e190019a3..bddbb3b884bf92e5149c946a7f6e0f05adf2e8ec 100644
--- a/core/DataTable/Renderer/Csv.php
+++ b/core/DataTable/Renderer/Csv.php
@@ -117,12 +117,17 @@ class Piwik_DataTable_Renderer_Csv extends Piwik_DataTable_Renderer
 	/**
 	 * Computes the output of the given data table
 	 *
-	 * @param Piwik_DataTable  $table
-	 * @param array            $allColumns
+	 * @param Piwik_DataTable|array  $table
+	 * @param array            		 $allColumns
 	 * @return string
 	 */
 	protected function renderTable($table, &$allColumns = array() )
 	{
+		if (is_array($table)) // convert array to DataTable
+		{
+			$table = Piwik_DataTable::makeFromSimpleArray($table);
+		}
+		
 		if($table instanceof Piwik_DataTable_Array)
 		{
 			$str = $this->renderDataTableArray($table, $allColumns);
diff --git a/core/DataTable/Renderer/Html.php b/core/DataTable/Renderer/Html.php
index c9ec98f3e59a056e7a012b92cf70f1890450f982..5e913e22bef291d1a6025437bf254eca302d87ee 100644
--- a/core/DataTable/Renderer/Html.php
+++ b/core/DataTable/Renderer/Html.php
@@ -77,6 +77,11 @@ class Piwik_DataTable_Renderer_Html extends Piwik_DataTable_Renderer
 	 */
 	protected function renderTable($table)
 	{
+		if (is_array($table)) // convert array to DataTable
+		{
+			$table = Piwik_DataTable::makeFromSimpleArray($table);
+		}
+		
 		if($table instanceof Piwik_DataTable_Array)
 		{
 			foreach($table->getArray() as $date => $subtable )
diff --git a/core/DataTable/Renderer/Json.php b/core/DataTable/Renderer/Json.php
index 812eb4e76a3268fd2842d2f4cfde719db1ef0f36..f026663e50ea2a79d7dc08e2cdc92b24f417c949 100644
--- a/core/DataTable/Renderer/Json.php
+++ b/core/DataTable/Renderer/Json.php
@@ -57,7 +57,7 @@ class Piwik_DataTable_Renderer_Json extends Piwik_DataTable_Renderer
 		if (is_array($table))
 		{
 			$array = $table;
-			if (self::shouldWrapArrayBeforeRendering($array))
+			if (self::shouldWrapArrayBeforeRendering($array, $wrapSingleValues = true))
 			{
 				$array = array($array);
 			}
diff --git a/core/DataTable/Renderer/Xml.php b/core/DataTable/Renderer/Xml.php
index ea3c546f6dfc898bbc7d728425a1d0530e94728a..b2261940d5afd49c124539a8f8e58de7a83c32f6 100644
--- a/core/DataTable/Renderer/Xml.php
+++ b/core/DataTable/Renderer/Xml.php
@@ -180,7 +180,8 @@ class Piwik_DataTable_Renderer_Xml extends Piwik_DataTable_Renderer
 		// NOTE: this is for backwards compatibility. before, array's were added to a new DataTable.
 		// if the array had arrays, they were added as multiple rows, otherwise it was treated as
 		// one row. removing will change API output.
-		$wrapInRow = $prefixLines === "\t" && self::shouldWrapArrayBeforeRendering($array, $isAssociativeArray);
+		$wrapInRow = $prefixLines === "\t"
+				  && self::shouldWrapArrayBeforeRendering($array, $wrapSingleValues = false, $isAssociativeArray);
 		
 		// render the array
 		$result = "";
diff --git a/lang/en.php b/lang/en.php
index 06e1a472257ec95689fb918293f59bcd76bca297..75ec585c86e99d5e0fa6988a24e0f9b2a83a9d3e 100644
--- a/lang/en.php
+++ b/lang/en.php
@@ -1878,20 +1878,20 @@ And thank you for using Piwik!',
 	'Overlay_ErrorNotLoadingDetails' => 'Maybe the page loaded on the right doesn\'t have the Piwik tracker code. In this case, try launching Overlay for a different page from the pages report.',
 	'Overlay_ErrorNotLoadingDetailsSSL' => 'Since you\'re using Piwik over https, the most likely cause is that your website doesn\'t support SSL. Try using Piwik over http.',
 	'Overlay_ErrorNotLoadingLink' => 'Click here to get more tips for troubleshooting',
-	'Annotations_PluginDescription' => 'Allows you to attach notes to different days so you will be remember why your data looks the way it does.',
+	'Annotations_PluginDescription' => 'Allows you to attach notes to different days to mark changes made to your website, save analyses you make regarding your data and share your thoughts with your colleagues. By annotating your data, you will make sure you remember why your data looks the way it does.',
 	'Annotations_Annotations' => 'Annotations',
 	'Annotations_EnterAnnotationText' => 'Enter your note...',
 	'CoreHome_Annotations_IconDesc_js' => 'View notes for this date range.',
 	'CoreHome_Annotations_IconDescHideNotes_js' => 'Hide notes for this date range.',
-	'Annotations_NoAnnotations' => 'There are no notes for this date range.',
+	'Annotations_NoAnnotations' => 'There are no annotations for this date range.',
+	'Annotations_InlineQuickHelp' => 'You can create annotations to mark special events (like a new blog post, or website redesign), to save your data analyses or to save anything else you think is important.',
 	'CoreHome_Annotations_ViewAndAddAnnotations_js' => 'View and add annotations for %s...',
 	'CoreHome_Annotations_HideAnnotationsFor_js' => 'Hide annotations for %s...',
 	'CoreHome_Annotations_AddAnnotationsFor_js' => 'Add annotations for %s...',
-	'Annotations_ClickToAdd' => 'Click to add an annotation.',
 	'Annotations_ClickToEdit' => 'Click to edit this annotation.',
 	'Annotations_ClickToDelete' => 'Click to delete this annotation.',
 	'Annotations_ClickToStarOrUnstar' => 'Click to star or unstar this annotation.',
-	'Annotations_YouCannotModifyThisNote' => 'You cannot modify this note, because you did not create it, nor do you do not have admin access for this site.',
-	'Annotations_CreateNewAnnotation' => 'Create new annotation...',
+	'Annotations_YouCannotModifyThisNote' => 'You cannot modify this annotation, because you did not create it, nor do you have admin access for this site.',
+	'Annotations_CreateNewAnnotation' => 'Create a new annotation...',
 	'Annotations_LoginToAnnotate' => 'Login to create an annotation.',
 );
diff --git a/plugins/Annotations/API.php b/plugins/Annotations/API.php
index cc49d594929051623a8a837c13149bf8c1fe8650..1ce6a469e379d73dfb3ae0f6f418f9da1310b0fb 100755
--- a/plugins/Annotations/API.php
+++ b/plugins/Annotations/API.php
@@ -52,16 +52,8 @@ class Piwik_Annotations_API
 	 */
 	public function add( $idSite, $date, $note, $starred = 0 )
 	{
-		// can only add a note to one site
-		if (!is_numeric($idSite))
-		{
-			throw new Exception("Invalid idSite: '$idSite'. Note: Cannot add one note to multiple sites.");
-		}
-		
-		// make sure date is a valid date
-		Piwik_Date::factory($date);
-		
-		// check permissions
+		$this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot add one note to multiple sites.");
+		$this->checkDateIsValid($date);
 		$this->checkUserCanAddNotesFor($idSite);
 		
 		// add, save & return a new annotation
@@ -97,17 +89,8 @@ class Piwik_Annotations_API
 	 */
 	public function save( $idSite, $idNote, $date = null, $note = null, $starred = null )
 	{
-		// cannot update notes for multiple sites
-		if (!is_numeric($idSite))
-		{
-			throw new Exception("Invalid idSite: '$idSite'. Note: Cannot modify more than one note at a time.");
-		}
-		
-		// make sure date is a valid date
-		if ($date !== null)
-		{
-			Piwik_Date::factory($date);
-		}
+		$this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot modify more than one note at a time.");
+		$this->checkDateIsValid($date, $canBeNull = true);
 		
 		// get the annotations for the site
 		$annotations = new Piwik_Annotations_AnnotationList($idSite);
@@ -136,11 +119,7 @@ class Piwik_Annotations_API
 	 */
 	public function delete( $idSite, $idNote )
 	{
-		// check that $idSite is single
-		if (!is_numeric($idSite))
-		{
-			throw new Exception("Invalid idSite: '$idSite'. Note: Cannot delete multiple notes.");
-		}
+		$this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot delete multiple notes.");
 		
 		$annotations = new Piwik_Annotations_AnnotationList($idSite);
 		
@@ -167,12 +146,7 @@ class Piwik_Annotations_API
 	 */
 	public function get( $idSite, $idNote )
 	{
-		// getting a single note means only ONE idSite
-		if (!is_numeric($idSite))
-		{
-			throw new Exception("Invalid idSite: '$idSite'. Note: Specify only one site ID when getting ONE note.");
-		}
-		
+		$this->checkSingleIdSite($idSite, $extraMessage = "Note: Specify only one site ID when getting ONE note.");
 		Piwik::checkUserHasViewAccess($idSite);
 		
 		// get single annotation
@@ -361,4 +335,32 @@ class Piwik_Annotations_API
 		}
 		return array($startDate, $endDate);
 	}
+	
+	/**
+	 * Utility function, makes sure idSite string has only one site ID and throws if
+	 * otherwise.
+	 */
+	private function checkSingleIdSite( $idSite, $extraMessage )
+	{
+		// can only add a note to one site
+		if (!is_numeric($idSite))
+		{
+			throw new Exception("Invalid idSite: '$idSite'. $extraMessage");
+		}
+	}
+	
+	/**
+	 * Utility function, makes sure date string is valid date, and throws if
+	 * otherwise.
+	 */
+	private function checkDateIsValid( $date, $canBeNull = false )
+	{
+		if ($date === null
+			&& $canBeNull)
+		{
+			return;
+		}
+		
+		Piwik_Date::factory($date);
+	}
 }
diff --git a/plugins/Annotations/AnnotationList.php b/plugins/Annotations/AnnotationList.php
index 8031d5c46874738c322415764763970388704fb9..f335c1315bcccd079537ec19317cd0c1a5026893 100755
--- a/plugins/Annotations/AnnotationList.php
+++ b/plugins/Annotations/AnnotationList.php
@@ -267,18 +267,16 @@ class Piwik_Annotations_AnnotationList
 	{
 		$this->checkIdSiteIsLoaded($idSite);
 		
+		// search includes end date, and count should not, so subtract one from the timestamp
+		$annotations = $this->search($startDate, Piwik_Date::factory($endDate->getTimestamp() - 1));
+		
 		// count the annotations
 		$count = $starred = 0;
-		foreach ($this->annotations[$idSite] as $annotation)
+		if (!empty($annotations[$idSite]))
 		{
-			$annotationDate = Piwik_Date::factory($annotation['date']);
-			
-			// if annotation start date is between start date & end date, increment count
-			if ($annotationDate->getTimestamp() >= $startDate->getTimestamp()
-				&& $annotationDate->getTimestamp() < $endDate->getTimestamp())
+			$count = count($annotations[$idSite]);
+			foreach ($annotations[$idSite] as $annotation)
 			{
-				++$count;
-				
 				if ($annotation['starred'])
 				{
 					++$starred;
diff --git a/plugins/Annotations/templates/annotation.tpl b/plugins/Annotations/templates/annotation.tpl
index 1a94cf60d6205056feed0703d423af5aa65cffe7..e1cd5f60136eaff194a8273194e5de5bd4e233cc 100755
--- a/plugins/Annotations/templates/annotation.tpl
+++ b/plugins/Annotations/templates/annotation.tpl
@@ -35,7 +35,7 @@
 	<td class="annotation-user-cell">
 		<span class="annotation-user">{$annotation.user|unescape|escape:'html'}</span><br/>
 		{if $annotation.canEditOrDelete}
-		<a href="#" class="delete-annotation" style="display:none" title="{'Annotations_ClickToDelete'|translate}">Delete</a>
+		<a href="#" class="delete-annotation" style="display:none" title="{'Annotations_ClickToDelete'|translate}">{'General_Delete'|translate}</a>
 		{/if}
 	</td>
 	{/if}
diff --git a/plugins/Annotations/templates/annotationManager.tpl b/plugins/Annotations/templates/annotationManager.tpl
index 4afa631cfd8838664dde9b7c43fe58ec4b808e42..7ba893a9729cc1888db118273298a91af71bf7ff 100755
--- a/plugins/Annotations/templates/annotationManager.tpl
+++ b/plugins/Annotations/templates/annotationManager.tpl
@@ -18,7 +18,7 @@
 
 <div class="annotation-controls">
 	{if $canUserAddNotes}
-	<a href="#" class="add-annotation" title="{'Annotations_ClickToAdd'|translate}">{'Annotations_CreateNewAnnotation'|translate}</a>
+	<a href="#" class="add-annotation">{'Annotations_CreateNewAnnotation'|translate}</a>
 	{elseif $userLogin eq 'anonymous'}
 	<a href="index.php?module=Login">{'Annotations_LoginToAnnotate'|translate}</a>
 	{/if}
diff --git a/plugins/Annotations/templates/annotations.js b/plugins/Annotations/templates/annotations.js
index 0a7ed20edd96a1e1ed60d2b2bbbbb624b93936f4..925c6525672156a0cc9055e03f2c3f74f5569cf5 100755
--- a/plugins/Annotations/templates/annotations.js
+++ b/plugins/Annotations/templates/annotations.js
@@ -159,6 +159,7 @@ var getDatePickerOptions = function(annotation)
 	result.onSelect = function (dateText)
 	{
 		$('.annotation-period-edit>a', annotation).text(dateText);
+		$('.datepicker', annotation).hide();
 	};
 	
 	return result;
@@ -293,6 +294,7 @@ var bindAnnotationManagerEvents = function(manager, idSite, onAnnotationCountCha
 		
 		// disable input & link
 		addNoteInput.attr('disabled', 'disabled');
+		$(this).attr('disabled', 'disabled');
 		
 		// add a new annotation for the site, date & period
 		annotationsApi.addAnnotation(
@@ -349,6 +351,7 @@ var bindAnnotationManagerEvents = function(manager, idSite, onAnnotationCountCha
 		
 		// disable input while ajax is happening
 		input.attr('disabled', 'disabled');
+		$(this).attr('disabled', 'disabled');
 	
 		// save the note w/ the new note text & date
 		annotationsApi.saveAnnotation(
@@ -402,8 +405,8 @@ var bindAnnotationManagerEvents = function(manager, idSite, onAnnotationCountCha
 			manager.attr('data-date'),
 			manager.attr('data-period'),
 			function (response) {
-				manager.html($(response).html());
-			
+				replaceAnnotationManager(manager, response);
+				
 				// update evolution icons
 				var isStarred = isAnnotationStarred(annotation);
 				onAnnotationCountChange(annotation.attr('data-date'), -1, isStarred ? -1 : 0);
@@ -455,6 +458,9 @@ var bindAnnotationManagerEvents = function(manager, idSite, onAnnotationCountCha
 	});
 };
 
+// used in below function
+var loadingAnnotationManager = false;
+
 /**
  * Shows an annotation manager under a report for a specific site & date range.
  * 
@@ -543,6 +549,14 @@ var showAnnotationViewer = function(domElem, idSite, date, period, lastN, callba
 	}
 	else
 	{
+		// if we are already loading the annotation manager, don't load it again
+		if (loadingAnnotationManager)
+		{
+			return;
+		}
+		
+		loadingAnnotationManager = true;
+		
 		var loading = $('.loadingPiwikBelow', domElem).css({display: 'block'});
 		
 		// the annotations for this report have not been retrieved yet, so do an ajax request
@@ -567,6 +581,7 @@ var showAnnotationViewer = function(domElem, idSite, date, period, lastN, callba
 			$('.dataTableFeatures', domElem).append(manager);
 			manager.slideDown('slow', function() {
 				loading.hide().css('visibility', 'visible');
+				loadingAnnotationManager = false;
 			
 				if (callback) callback(manager)
 			});
diff --git a/plugins/CoreHome/templates/datatable.js b/plugins/CoreHome/templates/datatable.js
index a2e57f098acebfc77de15cfe5700b4220e6f1d3e..7b56b7e7441d1bd8d9d0f1bcddb7af39f9bfe63d 100644
--- a/plugins/CoreHome/templates/datatable.js
+++ b/plugins/CoreHome/templates/datatable.js
@@ -590,18 +590,24 @@ dataTable.prototype =
 						}
 					);
 				
-					// when clicking an annotation, show the annotation viewer for that day
+					// when clicking an annotation, show the annotation viewer for that period
 					$('span', annotations).click(function() {
 						var spanSelf = $(this),
 							date = spanSelf.attr('data-date'),
 							oldDate = $('.annotation-manager', domElem).attr('data-date');
 						if (date)
 						{
+							var period = self.param.period;
+							if (period == 'range')
+							{
+								period = 'day';
+							}
+							
 							piwik.annotations.showAnnotationViewer(
 								domElem,
 								self.param.idSite,
 								date,
-								self.param.period,
+								period,
 								undefined, // lastN
 								function (manager) {
 									manager.attr('data-is-range', 0);
diff --git a/tests/PHPUnit/Core/DataTable/Renderer/CSVTest.php b/tests/PHPUnit/Core/DataTable/Renderer/CSVTest.php
index 3e4a62829ddaf9a66ecf6950262ae561c6537baf..a93886f8a0128491a6cb47aa116116e69941e751 100644
--- a/tests/PHPUnit/Core/DataTable/Renderer/CSVTest.php
+++ b/tests/PHPUnit/Core/DataTable/Renderer/CSVTest.php
@@ -412,4 +412,79 @@ class DataTable_Renderer_CSVTest extends PHPUnit_Framework_TestCase
         $rendered = $render->render();
         $this->assertEquals($expected, $rendered);
     }
+    
+	/**
+	 * @group Core
+	 * @group DataTable
+	 * @group DataTable_Renderer
+	 * @group DataTable_Renderer_XML
+	 */
+	public function testRenderArray1()
+	{
+		$data = array();
+		
+        $render = new Piwik_DataTable_Renderer_Csv();
+        $render->setTable($data);
+        $render->convertToUnicode = false;
+        $expected = 'No data available';
+        
+        $this->assertEquals($expected, $render->render());
+	}
+    
+	/**
+	 * @group Core
+	 * @group DataTable
+	 * @group DataTable_Renderer
+	 * @group DataTable_Renderer_XML
+	 */
+	public function testRenderArray2()
+	{
+		$data = array('a', 'b', 'c');
+		
+        $render = new Piwik_DataTable_Renderer_Csv();
+        $render->setTable($data);
+        $render->convertToUnicode = false;
+        $expected = 'a
+b
+c';
+        
+        $this->assertEquals($expected, $render->render());
+	}
+    
+	/**
+	 * @group Core
+	 * @group DataTable
+	 * @group DataTable_Renderer
+	 * @group DataTable_Renderer_XML
+	 */
+	public function testRenderArray3()
+	{
+		$data = array('a' => 'b', 'c' => 'd', 'e' => 'f', 5 => 'g');
+		
+        $render = new Piwik_DataTable_Renderer_Csv();
+        $render->setTable($data);
+        $render->convertToUnicode = false;
+        $expected = 'a,c,e,5
+b,d,f,g';
+        
+        $this->assertEquals($expected, $render->render());
+	}
+	
+	/**
+	 * @group Core
+	 * @group DataTable
+	 * @group DataTable_Renderer
+	 * @group DataTable_Renderer_XML
+	 */
+	public function testRenderArray4()
+	{
+		$data = array('a' => 'b');
+		
+        $render = new Piwik_DataTable_Renderer_Csv();
+        $render->setTable($data);
+        $render->convertToUnicode = false;
+        $expected = 'b';
+        
+        $this->assertEquals($expected, $render->render());
+	}
 }
diff --git a/tests/PHPUnit/Core/DataTable/Renderer/ConsoleTest.php b/tests/PHPUnit/Core/DataTable/Renderer/ConsoleTest.php
index 9f139c719d92a9331fa6de8ed98e9d47523c7d7c..bea84a0ea68478712a3fa3cfe11f92440aa778a5 100644
--- a/tests/PHPUnit/Core/DataTable/Renderer/ConsoleTest.php
+++ b/tests/PHPUnit/Core/DataTable/Renderer/ConsoleTest.php
@@ -88,4 +88,78 @@ class DataTable_Renderer_ConsoleTest extends PHPUnit_Framework_TestCase
 
         $this->assertEquals($expected, $rendered);
     }
+
+	/**
+	 * @group Core
+	 * @group DataTable
+	 * @group DataTable_Renderer
+	 * @group DataTable_Renderer_XML
+	 */
+	public function testRenderArray1()
+	{
+		$data = array();
+		
+        $render = new Piwik_DataTable_Renderer_Console();
+        $render->setTable($data);
+        $expected = 'Empty table<br />
+';
+        
+        $this->assertEquals($expected, $render->render());
+	}
+    
+	/**
+	 * @group Core
+	 * @group DataTable
+	 * @group DataTable_Renderer
+	 * @group DataTable_Renderer_XML
+	 */
+	public function testRenderArray2()
+	{
+		$data = array('a', 'b', 'c');
+		
+        $render = new Piwik_DataTable_Renderer_Console();
+        $render->setTable($data);
+        $expected = "- 1 ['0' => 'a'] [] [idsubtable = ]<br />
+- 2 ['0' => 'b'] [] [idsubtable = ]<br />
+- 3 ['0' => 'c'] [] [idsubtable = ]<br />
+";
+        
+        $this->assertEquals($expected, $render->render());
+	}
+    
+	/**
+	 * @group Core
+	 * @group DataTable
+	 * @group DataTable_Renderer
+	 * @group DataTable_Renderer_XML
+	 */
+	public function testRenderArray3()
+	{
+		$data = array('a' => 'b', 'c' => 'd', 'e' => 'f', 5 => 'g');
+		
+        $render = new Piwik_DataTable_Renderer_Console();
+        $render->setTable($data);
+        $expected = "- 1 ['a' => 'b', 'c' => 'd', 'e' => 'f', '5' => 'g'] [] [idsubtable = ]<br />
+";
+        
+        $this->assertEquals($expected, $render->render());
+	}
+	
+	/**
+	 * @group Core
+	 * @group DataTable
+	 * @group DataTable_Renderer
+	 * @group DataTable_Renderer_XML
+	 */
+	public function testRenderArray4()
+	{
+		$data = array('a' => 'b');
+		
+        $render = new Piwik_DataTable_Renderer_Console();
+        $render->setTable($data);
+        $expected = "- 1 ['0' => 'b'] [] [idsubtable = ]<br />
+";
+        
+        $this->assertEquals($expected, $render->render());
+	}
 }
diff --git a/tests/PHPUnit/Core/DataTable/Renderer/JSONTest.php b/tests/PHPUnit/Core/DataTable/Renderer/JSONTest.php
index c5970b399780bb7b0509c761c894faecdd0ff413..2c3bf653fd1d087549c8c8582c8206a2ecd5df84 100644
--- a/tests/PHPUnit/Core/DataTable/Renderer/JSONTest.php
+++ b/tests/PHPUnit/Core/DataTable/Renderer/JSONTest.php
@@ -412,7 +412,7 @@ class DataTable_Renderer_JSONTest extends PHPUnit_Framework_TestCase
 	 * @group Core
 	 * @group DataTable
 	 * @group DataTable_Renderer
-	 * @group DataTable_Renderer_XML
+	 * @group DataTable_Renderer_JSON
 	 */
 	public function testRenderArray2()
 	{
@@ -429,7 +429,7 @@ class DataTable_Renderer_JSONTest extends PHPUnit_Framework_TestCase
 	 * @group Core
 	 * @group DataTable
 	 * @group DataTable_Renderer
-	 * @group DataTable_Renderer_XML
+	 * @group DataTable_Renderer_JSON
 	 */
 	public function testRenderArray3()
 	{
@@ -446,7 +446,7 @@ class DataTable_Renderer_JSONTest extends PHPUnit_Framework_TestCase
 	 * @group Core
 	 * @group DataTable
 	 * @group DataTable_Renderer
-	 * @group DataTable_Renderer_XML
+	 * @group DataTable_Renderer_JSON
 	 */
 	public function testRenderArray4()
 	{
@@ -458,5 +458,22 @@ class DataTable_Renderer_JSONTest extends PHPUnit_Framework_TestCase
         
         $this->assertEquals($expected, $render->render());
 	}
+	
+	/**
+	 * @group Core
+	 * @group DataTable
+	 * @group DataTable_Renderer
+	 * @group DataTable_Renderer_JSON
+	 */
+	public function testRenderArray5()
+	{
+		$data = array('a' => 'b');
+		
+        $render = new Piwik_DataTable_Renderer_Json();
+		$render->setTable($data);
+		$expected = '[{"a":"b"}]';
+        
+        $this->assertEquals($expected, $render->render());
+	}
 
 }
diff --git a/tests/PHPUnit/Core/DataTable/Renderer/XMLTest.php b/tests/PHPUnit/Core/DataTable/Renderer/XMLTest.php
index 0594c0a1dacac02948b4ccbc4db8efd5fd3168ee..7291222390cd329108a2f3fe2c8b12918ae170dc 100644
--- a/tests/PHPUnit/Core/DataTable/Renderer/XMLTest.php
+++ b/tests/PHPUnit/Core/DataTable/Renderer/XMLTest.php
@@ -574,15 +574,21 @@ class DataTable_Renderer_XMLTest extends PHPUnit_Framework_TestCase
 	 */
 	public function testRenderArray2()
 	{
-		$data = array('a', 'b', 'c');
+		$data = array("firstElement", 
+					  array("firstElement", 
+							"secondElement"), 
+					  "thirdElement");
 		
         $render = new Piwik_DataTable_Renderer_Xml();
         $render->setTable($data);
         $expected = '<?xml version="1.0" encoding="utf-8" ?>
 <result>
-	<row>a</row>
-	<row>b</row>
-	<row>c</row>
+	<row>firstElement</row>
+	<row>
+		<row>firstElement</row>
+		<row>secondElement</row>
+	</row>
+	<row>thirdElement</row>
 </result>';
         
         $this->assertEquals($expected, $render->render());