refactored figure, figcaption and headings