Minor code organization, enabling autorestart (but not autostart) for test master