Thesis title: Electronic and Optical Properties of Defects in Amorphous Oxide and Transition Metal Dichalcogenide Semiconductors