Added sort flag to table info. Better reporting and some bug fixes for task 2.