Cleanup postprocess and add more tests