Moved the graphics output javascript to the layout jade file.