Extract Concatr's helper functions into separate functions to improve readability

Rename app3 to glue, which is more descriptive. Also add comments for app3 and nodes.