Refactored vhost macro