Refactor vhost