Refactor rerun some more to allow for Mac integration