Getting the basic process working. Needs more tests, though.