Two-dimensional devices