minor refactoring and clean up in Supervisor