refactor: restore grouping of functions in script
refactor: restore grouping of functions in script

Recent(ish) changes placed functions in the wrong sections. Fix that
and label the sections more clearly.

n054/weave,n054/weave,paulbellamy/weave,paulbellamy/weave,n054/weave,weaveworks/weave,paulbellamy/weave,n054/weave,weaveworks/weave,paulbellamy/weave,weaveworks/weave,weaveworks/weave,n054/weave