Refactoring: separate classes for visualization