Separate out actor and local running code