Refactor opening host windows