Improvements to chapter 7, particularly for SQLFORM.grid