glue: save the listeners on a stack

Also document the whole thing so maybe more people can understand what
it's doing.