A good diagnosis and debugging technique when altering Joomla code is to be able to print out the $this object and determine the content of is variables.
For example, put the following code at the bottom of your index.php template (just above the body close tag)...
<?php
print_r($this);
?>
It will print out useful variable information as to what Joomla code knows for this page. If the display is ugly, view it with "view source" of your browser.
In particular, one useful bit of information is to detect the title of the page. And you can retrive this information from the $this object by ...
echo $this->title;
Hope that helps.