Function spaces related to the Dirichlet space