remove meaningless codes