Added sorting support by clicking on table cell header

Updated the code according to the comments

Updated some conventions and fixed a small bug

Added default sort method

Fixed typo