cleaned up the post-processing stuff a bit