Removed old main loop.