chisel: Small cleanups and fixes in emulator.