Refactored and created separate class for tree mouse listener.