move API examples in to templates, where they should be