moving bytecode generation to its own module