Refactoring for VHost integration