Added a conversion function to lists
Added tests for to_list