Wrap gallery code for standalone compilation

closes #59