Phase 2

Modified the model to handle ordering and order direction.
Modified the helper to do the data sorting and manipulation.