Started implementing the main loop, about to merge to master.