massive changes to document. separated appendices and bib