Major changes to the main cycle, not working properly.