Formation and decay of coherent structures in pipe flow