Added table sorting for questions.
[TIm, Tunji] Added sort functionality on the survey table. Did some refactoring