Fixed marshal bugs, added more testing.