Major refactor in progress.  But this commit reflects new structure.