Added unit test for HexBytecodeGenerator and minor fixes for other tests