Cleaned up code, added fast rebooting.