Factor out supervisor