Add EmitHelloWorld, fix bugs while at it.