Theoretical Studies of Defects in Binary and Ternary Oxides