Magnetism and hydrogen storage in LaNi5, FeTi and Mg2Ni