Updated generator function to return a list if batch_size is None else a iterator.
Simplification and cleanup in macro generator code
Added LHS example to tutorial