Added sortFreeSpaceTable function

Also started work on resizing entries