Factor out orderings_list and current_order_name functions to be reused
  outside this package.