Added dependency injection for vistor tracking