Added a few new opcodes and fixed some bugs