clean identation and use the if,endif,for,endfor form.
fix the unclosed div and remove the double ul
stop displaying of rss entries if there is no more