Support process groups in Supervisor

As titled, plus a little clean up :)