Add a method for restarting
Implement restarting in demo app