Nanotechnology, in order to become ultimately efficient, requires achieving the construction of elemental structures at the atomistic precision. One way toward this goal is using templated surfaces as support for directed synthesis. The nanomesh, a single-atom thick layer of hexagonal boron nitride on Rh(111) [Corso et al., Science 2004, 303, 217], has appeared as one candidate that provides a periodically corrugated structure on the nanometre scale. We present density functional theory studies where we investigate various properties of the nanomesh, ranging from intrinsic defects to covalent functionalisation with hydroxyl radicals. Further we study selective dehalogenation of an organic molecule (I6-CHP) on the nanomesh. This molecule adsorbs at particular sites of the template and has been activated for C-C coupling in recent experiments via dissociation of its halogen ligands. In all cases we find explicit templating effects, either in full agreement with experimental studies or predicting novel phenomena. The studies are evidence for the predictive power of modern electronic structure simulations and the insight that can be gained when used together with experiments on complex chemical structures.