Refactor command dispatching to be more git style

This greatly simplifies command handling.

* No longer forces commands to be a class
* Commands are self contained, making it easier to reason about them
* Switches the upload command to be able to be called programmatically