Command refactor

Refactored the project so that commands.go is in its own sub-package, and there's also a db sub-package which keeps the redis pool as well as some other helper functions.
The restore key is in case we have multiple instances of this app running. This allows redis to provide a lock (via setexnx) for restoring the event.