Split out startup code to subfunction, allow custom ActorSystem creation