Added a restart system, which also makes the code cleaner, nice.