Got rid of MainLoop