Restructure a lot of VHDL generating code.