Address review comments; cache code clean-up; more cache tests