Applying visitor-pattern to increase reuseability