Refactored bytecode lookup helpers into new bytecode module

I added a bytecode module that has some helper functions for stack counting, as well as moved kind -> opcode lookups into it