Various code structure fixes to coupling interface.