added some shared post processing, and some other things