Refactor some instruction creation functions