Some test and refactoring, add virtualserver.