delete unnecessary commands.
refractor