Added a legit main loop