Added comments to and cleaned up index.php.