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.
Yeah, if we keep that check in then that's cool, we keep the common case fast but we can be safe still. I'll do that now.