add indexes on test_categories table
tidy up category methods
Check BatchRecorder records tests correctly