Extract getOp to top level defn