some redundancy removed from bytecode generator methods