Refactor "Figures" sample.