Remove main_loop wrapper

Users should run the main loop themselves.