Fix stencil page generation
Adds some cleaning tasks
Change storage of stencil metadata; see #22