Reuse some list.js standard template functions (thanks to wvengen https://gist.github.com/wvengen/6784056)