Atomistic investigation into the interface engineering and heteroepitaxy of functional oxides on hexagonal silicon carbide through the use of a magnesium oxide template layer for the development of a multifunctional heterostructure