Rewrote all command logic