Restructured code to use Chapter and Notes objects. No new materail added.