cleanup hosts and allow custom stubs input