Combined three sections a Mathematical Foundations section.
Converted the code listings into figures.
Put optimized tensor contractions into Appendix A.
Put optimized tensor contractions into Appendix A.
Added more material to the algorithms section.
Added *.toc to .gitignore.