Update spyglass.
Move all repeated smarty code to one file.

https://www.pivotaltracker.com/story/show/64712250