RTL fixes to remove inferred latches and fix warnings found during synthesis.