Some HDL code generation fixes/cleanups.