Code related to Kami's Thesis