Rewrote architecture to fit the analysis chapter.