Refactor and cleanup
Save data every 10 minutes
Add resurrect command.