Made changes to parser to better support sorting and filtering without misusing the iDataSort property. Also refactored much of the code and fixed some bugs.