Simplifying commands and removing unused commands.