Remove unnessecery commands.