Added sorting functionality, fixed issues with using a 'multiples' column and sorting and fixed issues with performing aggregate queries
Fixed a bug with searching when no type was specified. Fixed a bug with searching when there existed aggregated fields (at the moment they are ignored)