clean-ups/simplifications of buffer cache code