Cleaned up. Now eventloop.py has a proper event loop.