Refactor BitmapCache