Fixes for PHP 5.4
Tweaks to the listing template