Adapt function representations to new metadata system (Issue #393)