added code to remove nodes when they are off screen.