Kinetic and structural studies of Mg-based materials for hydrogen storage and switchable mirror applications