Ordered return options

Adding ordered return options, moving functions.