remove unused lines
refactoring usage of visitors