Removing dependency on 'wc', compacting a few lines, and moving row/column counting into slide() function so that if you resize the window during the presentation, the next slide will re-calculate and display correctly.