Refactored code

Moved restartCount update to manager