Refactored main loop; properly fixes startup issue