Fine tuning

Fixed sorting logic, added methods .printTable() and .printCustom()