Better error messages, additional tests to test cache updating, bits and bobs.