tidy up code in list.tpl and update config