Added new formatting functions

To further enhance the API I added new formatting for the to_string function and an additional option of to_list.