Added `max_rows` and `max_cols` options.

This is just a hack. Use at your own risk.