The model is organized into  a top level diagram and subroutines, for visual simplicity.