Code refactored to use orderByParms class method to sort tables