Refactoring bytecode converting function.