Brings example functions up to date with new structure