Convert commands to be in their own classes, clean up some code.