Split out seq operations into separate functions.