Moved lists and pairs functions to separate file