clean up list code

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>