Upgrades to codegen and bytecode scanning