Converted quicksort helper functions to variables