Some changes in commands, refactoring.