Cache background image and mask image
Refactor specs and add example