Rewrite some instruction helpers at deviceSet function