Intermediate version, implementing fetch_opcodes