A couple of optimizations.

- Using % for string interpolation is faster than .format
- No more indexing into tuples