Added functions for converting to and from lists.