Rewrote hosts file management to a define