cleaned up virtual directory handling