Formatted code
Fully fixed restart level bug