Wrote end to end example and resolved a few bugs that cropped up while doing so.