refactoring: removing repaint loop from shell.