Surface effects and the formation of metal hydrides