Started work on generalizing the capture routines.