Crystal engineering in two- and three-dimensional systems based on cyanomolybdates: structures, magnetism and intercalation properties