Added configuration system, and added restart functionality