Added endnotes. Fixed appendix format.