cleaned up SmallestTableScan and added tests