Get functions working better together

Clean up functions so outputs can become inputs, and add vignette to demonstrate how to use them.