Changes and improvements. Add tests for read cache