Relocate common code which can be used by drivers and by main into
'common'.  Cleanup includes.  Fix FY90Q target compilation.