Rewrite list_* API to make more sense