Improved basic statement code generation