Rewrote the registerCommands