cleanup and additions for inclusion in thesis