Cleanup and clarify commenting
Tidy up cache_test code a bit