Interfacial flows in confined spaces find wide application, from lung airways to microfluidic devices. Surface tension is a dominant feature, mediated by factors such as contact lines, surfactants and the domain geometry. This talk will illustrate some interactions between these features. The first part concerns the spreading of surfactant in a channel network, addressing an unusual contact-line singularity and the capacity of surfactants to solve a maze. The second part of the talk concerns the manner in which wall roughness can shape and sometimes trap interfaces in channels and tubes.