Remove main loop