Thanks for this one!
I hope you will continue to evolve this one cause it's a simple jet effective php script!
I was looking for a simple and fast solution and I higly recomeand this to all affiliate clock seekers out there - this will work on any shared hosting...
to change default go slug edit the 51 line
'rewrite' => array( 'slug' => 'pe', 'with_front' => false )