Documentation coming. See test.pl for usage.