Diagnosing, Optimizing And Designing Ni & Mn Based Layered Oxides As Cathode Materials For Next Generation Li-Ion Batteries And Na-Ion Batteries