Adding header and footer to the loop modules.
Adding header and footer to the inverter module.
Fixed constant definition.
Adding an update port to control the state update.