(c backend) Add BlockFor and InstTernary support

And minor fixes