Add main back with mainloop