Fixed the hard coded sizes by introducing function enableDefaultSampleGenerator. Also now cached batches are proper tables, not tuples.