Better typing of Elements and a doctest for listify.