More refactoring.
Finished all commands.