Feature/700 better pid selector

/to: @anthonyettinger 

Fixes #700 
Fixes #668